X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fblackbox.cc;h=e8b8dcaaf5210b4985acda63be926f2d3075a5b9;hb=db3e93a3c1a57d962741a572a0913ce2555d9dba;hp=efb782a559ecea0f970336a7bd58b743a4ba590e;hpb=a2db09b869a588e56f816a41e3e7f31140183406;p=chaz%2Fopenbox diff --git a/src/blackbox.cc b/src/blackbox.cc index efb782a5..e8b8dcaa 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); + } } }