]> Dogcows Code - chaz/openbox/commitdiff
clear the over item in the menu when executing shit
authorDana Jansens <danakj@orodu.net>
Thu, 26 Jun 2003 07:22:29 +0000 (07:22 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 26 Jun 2003 07:22:29 +0000 (07:22 +0000)
openbox/event.c

index 3ff1fd1d877055747c7d24f188a793d40f5c45cd..2a47ef091c7ed264df5162bdea98bb9156fe9fe9 100644 (file)
@@ -1001,6 +1001,7 @@ static void event_handle_menu(Client *client, XEvent *e)
             else
                 menu_control_mouseover(over, FALSE);
             menu_entry_render(over);
+            over = NULL;
         }
 /*
         if (top->hide)
@@ -1032,6 +1033,15 @@ static void event_handle_menu(Client *client, XEvent *e)
                                                     m->location.x,
                                                     e->xbutton.y_root -
                                                     m->location.y))) {
+                    if (over) {
+                        if (over->parent->mouseover)
+                            over->parent->mouseover(over, FALSE);
+                        else
+                            menu_control_mouseover(over, FALSE); 
+                        menu_entry_render(over);
+                        over = NULL;
+                    }
+                    /* this hides the menu */
                     menu_entry_fire(entry);
                 }
                 break;
@@ -1044,6 +1054,7 @@ static void event_handle_menu(Client *client, XEvent *e)
                 else
                     menu_control_mouseover(over, FALSE); 
                 menu_entry_render(over);
+                over = NULL;
             }
 /*
             if (top->hide)
This page took 0.031654 seconds and 4 git commands to generate.