]> Dogcows Code - chaz/openbox/blobdiff - src/blackbox.cc
actually check if a window has the function flags approproate before trying to perfor...
[chaz/openbox] / src / blackbox.cc
index efb782a559ecea0f970336a7bd58b743a4ba590e..e8b8dcaaf5210b4985acda63be926f2d3075a5b9 100644 (file)
@@ -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);
+        }
       }
     }
 
This page took 0.023141 seconds and 4 git commands to generate.