From: Scott Moynes Date: Sun, 29 Jun 2003 01:44:31 +0000 (+0000) Subject: Handle menu events a little better: don't bother updating a submenu on X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=71b7b043a2ca6fc99a41a1e47e76f96eb7218ad9;p=chaz%2Fopenbox Handle menu events a little better: don't bother updating a submenu on mouseover if it is already open, and call update on menus, even if they aren't marked as invalid. --- diff --git a/openbox/menu.c b/openbox/menu.c index 9993b350..f7eef7fb 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -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 */ diff --git a/openbox/menu_render.c b/openbox/menu_render.c index d3b0e016..deebfd89 100644 --- a/openbox/menu_render.c +++ b/openbox/menu_render.c @@ -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;