dont lose the menu selection while puttin the mouse over a separator (properly)
authorDana Jansens <danakj@orodu.net>
Sun, 31 Aug 2003 19:54:34 +0000 (19:54 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 31 Aug 2003 19:54:34 +0000 (19:54 +0000)
openbox/menuframe.c

index 640e860..e27bde0 100644 (file)
@@ -617,12 +617,12 @@ void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry)
     ObMenuEntryFrame *old = self->selected;
     ObMenuFrame *oldchild = self->child;
 
+    if (entry && entry->entry->type == OB_MENU_ENTRY_TYPE_SEPARATOR)
+        entry = old;
+
     if (old == entry) return;
 
-    if (entry && entry->entry->type != OB_MENU_ENTRY_TYPE_SEPARATOR)
-        self->selected = entry;
-    else
-        self->selected = NULL;
+    self->selected = entry;
 
     if (old)
         menu_entry_frame_render(old);