text_a->texture[0].data.text.string = self->entry->data.normal.label;
if (self->entry->data.normal.shortcut &&
(self->frame->menu->show_all_shortcuts ||
+ self->entry->data.normal.shortcut_always_show ||
self->entry->data.normal.shortcut_position > 0))
{
text_a->texture[0].data.text.shortcut = TRUE;
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 ||
+ sub->shortcut_always_show ||
sub->shortcut_position > 0))
{
text_a->texture[0].data.text.shortcut = TRUE;
if (self->entry->data.separator.label != NULL) {
h += ob_rr_theme->menu_title_height +
(ob_rr_theme->mbwidth - PADDING) * 2;
-
+
/* if the first entry is a labeled separator, then make its border
overlap with the menu's outside border */
if (first_entry)
STRUT_SET(self->item_margin, 0, 0, 0, 0);
if (self->entries) {
- ObMenuEntryFrame *e = self->entries->data;
gint l, t, r, b;
+ e = self->entries->data;
e->a_text_normal->texture[0].data.text.string = "";
tw = RrMinWidth(e->a_text_normal);
tw += 2*PADDING;
}
RECT_SET_POINT(e->area, 0, h+e->border);
- XMoveWindow(ob_display, e->window, e->area.x-e->border, e->area.y-e->border);
+ XMoveWindow(ob_display, e->window,
+ e->area.x-e->border, e->area.y-e->border);
XSetWindowBorderWidth(ob_display, e->window, e->border);
XSetWindowBorder(ob_display, e->window,
RrColorPixel(ob_rr_theme->menu_border_color));
more_frame = menu_entry_frame_new(more_entry, self);
/* make it get deleted when the menu frame goes away */
menu_entry_unref(more_entry);
-
+
/* add our More... entry to the frame */
self->entries = g_list_append(self->entries, more_frame);
}
menu_frame_free(self);
}
-void menu_frame_hide_all()
+void menu_frame_hide_all(void)
{
GList *it;
GList *it = g_list_last(menu_frame_visible);
if (it) {
ObMenuFrame *f = it->data;
- if (f->client == client)
+ if (f->client == client) {
+ if (config_submenu_show_delay) {
+ /* remove any submenu open requests */
+ ob_main_loop_timeout_remove(ob_main_loop,
+ menu_entry_frame_submenu_timeout);
+ }
menu_frame_hide(f);
+ }
}
}
static gboolean menu_entry_frame_submenu_timeout(gpointer data)
{
+ g_assert(menu_frame_visible);
menu_entry_frame_show_submenu((ObMenuEntryFrame*)data);
return FALSE;
}
entry = old;
if (old == entry) return;
-
- if (config_submenu_show_delay) {
+
+ if (config_submenu_show_delay) {
/* remove any submenu open requests */
ob_main_loop_timeout_remove(ob_main_loop,
menu_entry_frame_submenu_timeout);