]> Dogcows Code - chaz/openbox/commitdiff
unhilite the entry for the submenu when it is closed
authorDana Jansens <danakj@orodu.net>
Wed, 23 Jul 2003 03:58:50 +0000 (03:58 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 23 Jul 2003 03:58:50 +0000 (03:58 +0000)
openbox/menu.c

index c953708bbd9ea5659fe4aabccddc5496523a14db..4c7adc926ff2ce2faa30ea1c1a1e4fcc809007f4 100644 (file)
@@ -40,11 +40,10 @@ void parse_menu_full(xmlDocPtr doc, xmlNodePtr node, void *data,
         g_message("menu label %s", title);
 
         if (parse_attr_string("plugin", node, &plugin)) {
-            PluginMenuCreateData data = {
-                .doc = doc,
-                .node = node,
-                .parent = menu
-            };
+            PluginMenuCreateData data;
+            data.doc = doc;
+            data.node = node;
+            data.parent = menu;
             parent = plugin_create(plugin, &data);
             g_free(plugin);
         } else
@@ -367,9 +366,19 @@ void menu_hide(ObMenu *self) {
         self->shown = FALSE;
        if (self->open_submenu)
            menu_hide(self->open_submenu);
-       if (self->parent && self->parent->open_submenu == self)
+       if (self->parent && self->parent->open_submenu == self) {
+            ObMenuEntry *e;
+
            self->parent->open_submenu = NULL;
 
+            e = menu_find_entry_by_submenu(self->parent, self);
+            if (self->parent->mouseover)
+                self->parent->mouseover(e, FALSE);
+            else
+                menu_control_mouseover(e, FALSE);
+            menu_entry_render(e);
+        }
+
         if (!(self->parent && self->parent->shown)) {
             grab_keyboard(FALSE);
             grab_pointer(FALSE, None);
This page took 0.026611 seconds and 4 git commands to generate.