X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;fp=openbox%2Fmenuframe.c;h=6110045cc459dd2596781242c90c4be3d72b2d93;hb=588aa0790abd0bf6452843c0e3490482e90b3654;hp=e6fc53ab2949cbb2b8fcc2b14d7e4823ac84a5bf;hpb=6ad5f085fa5a38ab8373769cac5cd52839d0a7a5;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index e6fc53ab..6110045c 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -181,7 +181,8 @@ static ObMenuEntryFrame* menu_entry_frame_new(ObMenuEntry *entry, self->text = createWindow(self->window, 0, NULL); g_hash_table_insert(menu_frame_map, &self->window, self); g_hash_table_insert(menu_frame_map, &self->text, self); - if (entry->type == OB_MENU_ENTRY_TYPE_NORMAL) { + if ((entry->type == OB_MENU_ENTRY_TYPE_NORMAL) || + (entry->type == OB_MENU_ENTRY_TYPE_SUBMENU)) { self->icon = createWindow(self->window, 0, NULL); g_hash_table_insert(menu_frame_map, &self->icon, self); } @@ -209,7 +210,8 @@ static void menu_entry_frame_free(ObMenuEntryFrame *self) XDestroyWindow(obt_display, self->window); g_hash_table_remove(menu_frame_map, &self->text); g_hash_table_remove(menu_frame_map, &self->window); - if (self->entry->type == OB_MENU_ENTRY_TYPE_NORMAL) { + if ((self->entry->type == OB_MENU_ENTRY_TYPE_NORMAL) || + (self->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU)) { XDestroyWindow(obt_display, self->icon); g_hash_table_remove(menu_frame_map, &self->icon); } @@ -522,7 +524,8 @@ static void menu_entry_frame_render(ObMenuEntryFrame *self) g_assert_not_reached(); } - if (self->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && + if (((self->entry->type == OB_MENU_ENTRY_TYPE_NORMAL) || + (self->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU)) && self->entry->data.normal.icon) { RrAppearance *clear;