]> Dogcows Code - chaz/openbox/commitdiff
dont make motions in menus outside of the active menu, its child, and its parent...
authorDana Jansens <danakj@orodu.net>
Mon, 28 May 2007 03:31:06 +0000 (03:31 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 28 May 2007 03:31:06 +0000 (03:31 +0000)
openbox/event.c

index 5590221fe0cd632277f2486f443b5c91b557eae8..1b387bdfb39c92e4574682eeeb5b0b5acf94561c 100644 (file)
@@ -1692,7 +1692,10 @@ static gboolean event_handle_menu(XEvent *ev)
         if ((e = g_hash_table_lookup(menu_frame_map, &ev->xcrossing.window))) {
             if (e->ignore_enters)
                 --e->ignore_enters;
-            else
+            else if (!(f = find_active_menu()) ||
+                     f == e->frame ||
+                     f->parent == e->frame ||
+                     f->child == e->frame)
                 menu_frame_select(e->frame, e, FALSE);
         }
         break;
@@ -1711,7 +1714,11 @@ static gboolean event_handle_menu(XEvent *ev)
     case MotionNotify:   
         if ((e = menu_entry_frame_under(ev->xmotion.x_root,   
                                         ev->xmotion.y_root)))
-            menu_frame_select(e->frame, e, FALSE);
+            if (!(f = find_active_menu()) ||
+                f == e->frame ||
+                f->parent == e->frame ||
+                f->child == e->frame)
+                menu_frame_select(e->frame, e, FALSE);
         break;
     case KeyPress:
         ret = event_handle_menu_keyboard(ev);
This page took 0.026211 seconds and 4 git commands to generate.