]> Dogcows Code - chaz/openbox/commitdiff
Handle menu events a little better: don't bother updating a submenu on
authorScott Moynes <smoynes@nexus.carleton.ca>
Sun, 29 Jun 2003 01:44:31 +0000 (01:44 +0000)
committerScott Moynes <smoynes@nexus.carleton.ca>
Sun, 29 Jun 2003 01:44:31 +0000 (01:44 +0000)
mouseover if it is already open, and call update on menus, even if
they aren't marked as invalid.

openbox/menu.c
openbox/menu_render.c

index 9993b35085650f2645cab2f5fff965f155c28ef9..f7eef7fb08c3e4bcad316bf9fe88a89a79f190d1 100644 (file)
@@ -436,7 +436,7 @@ void menu_control_mouseover(MenuEntry *self, gboolean enter) {
            != self->parent->open_submenu)
            menu_hide(self->parent->open_submenu);
        
-       if (self->submenu) {
+       if (self->submenu && self->parent->open_submenu != self->submenu) {
            self->parent->open_submenu = self->submenu;
 
            /* shouldn't be invalid since it must be displayed */
index d3b0e0169fac3d976c4df7950accd82b3114aad1..deebfd8999541a70171e57e6ca7c0fe44b1eca4d 100644 (file)
@@ -7,15 +7,12 @@
 void menu_render_full(Menu *self);
 
 void menu_render(Menu *self) {
-    if (self->invalid) {
-       if (self->update) {
-           self->update(self);
-       } else {
-           menu_render_full(self);
-       }
+    if (self->update) {
+        self->update(self);
+    } else if (self->invalid) {
+        menu_render_full(self);
     }
 }
-           
 
 void menu_render_full(Menu *self) {
     GList *it;
This page took 0.02557 seconds and 4 git commands to generate.