From: Dana Jansens Date: Sun, 31 Aug 2003 19:54:34 +0000 (+0000) Subject: dont lose the menu selection while puttin the mouse over a separator (properly) X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=7b06426b51dd81b1c1eacd67d8edb2976ea10456;p=chaz%2Fopenbox dont lose the menu selection while puttin the mouse over a separator (properly) --- diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 640e860e..e27bde01 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -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);