X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fblackbox.cc;h=ecf69651665c488ea929eedbc1d4d3211798edb3;hb=6b1459e6f08d0759ed7b88f0748012d53962f2b3;hp=efb782a559ecea0f970336a7bd58b743a4ba590e;hpb=a2db09b869a588e56f816a41e3e7f31140183406;p=chaz%2Fopenbox diff --git a/src/blackbox.cc b/src/blackbox.cc index efb782a5..ecf69651 100644 --- a/src/blackbox.cc +++ b/src/blackbox.cc @@ -908,6 +908,28 @@ void Blackbox::process_event(XEvent *e) { } } } + } else if (e->xclient.message_type == + xatom->getAtom(XAtom::openbox_show_root_menu) || + e->xclient.message_type == + xatom->getAtom(XAtom::openbox_show_workspace_menu)) { + // find the screen the mouse is on + int x, y; + ScreenList::iterator it, end = screenList.end(); + for (it = screenList.begin(); it != end; ++it) { + Window w; + int i; + unsigned int m; + if (XQueryPointer(getXDisplay(), (*it)->getRootWindow(), + &w, &w, &x, &y, &i, &i, &m)) + break; + } + if (it != end) { + if (e->xclient.message_type == + xatom->getAtom(XAtom::openbox_show_root_menu)) + (*it)->showRootMenu(x, y); + else + (*it)->showWorkspaceMenu(x, y); + } } } @@ -925,7 +947,7 @@ void Blackbox::process_event(XEvent *e) { XShapeEvent *shape_event = (XShapeEvent *) e; BlackboxWindow *win = searchWindow(e->xany.window); - if (win) + if (win && shape_event->kind == ShapeBounding) win->shapeEvent(shape_event); } #endif // SHAPE