]> Dogcows Code - chaz/openbox/commitdiff
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 640e860e3458ce2ea56078a090d9ee71b162fba7..e27bde0169ed9e8644bfef2f54dc9c8cf90e55c1 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);
This page took 0.023421 seconds and 4 git commands to generate.