]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
make submenus not require the menu to exist when they are created, not until they...
[chaz/openbox] / openbox / event.c
index 6480855e7553d7f4959897a3ae87b10297f73a9c..bbde397e7789c90efbb157e3ac9e5630a1525f37 100644 (file)
@@ -1170,21 +1170,22 @@ static void event_handle_menu(XEvent *ev)
 
     switch (ev->type) {
     case ButtonRelease:
-        if (!(f = menu_frame_under(ev->xmotion.x_root,
-                                   ev->xmotion.y_root)))
+        if (!(f = menu_frame_under(ev->xbutton.x_root,
+                                   ev->xbutton.y_root)))
             menu_frame_hide_all();
         else {
-            if ((e = menu_entry_frame_under(ev->xmotion.x_root,
-                                            ev->xmotion.y_root)))
-                menu_entry_frame_execute(e);
+            if ((e = menu_entry_frame_under(ev->xbutton.x_root,
+                                            ev->xbutton.y_root)))
+                menu_entry_frame_execute(e,
+                                         !(ev->xbutton.state & ControlMask));
         }
         break;
     case MotionNotify:
         if ((f = menu_frame_under(ev->xmotion.x_root,
                                   ev->xmotion.y_root))) {
             menu_frame_move_on_screen(f);
-            if (e = menu_entry_frame_under(ev->xmotion.x_root,
-                                           ev->xmotion.y_root))
+            if ((e = menu_entry_frame_under(ev->xmotion.x_root,
+                                            ev->xmotion.y_root)))
                 menu_frame_select(f, e);
         }
         break;
This page took 0.021673 seconds and 4 git commands to generate.