X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=1dbc6d4e9e95ee8d1ce9340a05a063fa395007aa;hb=fa0ae17adbc8f73b707c33836d37841e81b9303a;hp=7b4c872b475b5b30f1ed0964d0758f3bbc70ee92;hpb=163950b23bf796a39870044417ca54d667b6b470;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 7b4c872b..1dbc6d4e 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -396,7 +396,7 @@ static void menu_entry_frame_render(ObMenuEntryFrame *self) ob_rr_theme->a_menu_text_normal); sub = self->entry->data.submenu.submenu; text_a->texture[0].data.text.string = sub ? sub->title : ""; - if (sub->shortcut && (self->frame->menu->show_all_shortcuts || + if (sub && sub->shortcut && (self->frame->menu->show_all_shortcuts || sub->shortcut_always_show || sub->shortcut_position > 0)) { @@ -414,6 +414,8 @@ static void menu_entry_frame_render(ObMenuEntryFrame *self) else text_a = ob_rr_theme->a_menu_text_normal; break; + default: + g_assert_not_reached(); } switch (self->entry->type) { @@ -482,6 +484,8 @@ static void menu_entry_frame_render(ObMenuEntryFrame *self) 2*ob_rr_theme->menu_sep_paddingy); } break; + default: + g_assert_not_reached(); } if (self->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && @@ -701,7 +705,6 @@ void menu_frame_render(ObMenuFrame *self) XSetWindowBorder(obt_display, e->window, RrColorPixel(ob_rr_theme->menu_border_color)); - text_a = (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && !e->entry->data.normal.enabled ? /* disabled */ @@ -751,6 +754,8 @@ void menu_frame_render(ObMenuFrame *self) 2*ob_rr_theme->menu_sep_paddingy - 2*PADDING; } break; + default: + g_assert_not_reached(); } tw += 2*PADDING; th += 2*PADDING; @@ -1091,7 +1096,6 @@ void menu_frame_hide_all_client(ObClient *client) } } - ObMenuFrame* menu_frame_under(gint x, gint y) { ObMenuFrame *ret = NULL;