static void menu_entry_frame_free(ObMenuEntryFrame *self);
static void menu_frame_update(ObMenuFrame *self);
static gboolean menu_entry_frame_submenu_timeout(gpointer data);
+static void menu_frame_hide(ObMenuFrame *self);
static Window createWindow(Window parent, gulong mask,
XSetWindowAttributes *attrib)
self->entry->data.normal.icon_width;
self->a_icon->texture[0].data.rgba.height =
self->entry->data.normal.icon_height;
+ self->a_icon->texture[0].data.rgba.alpha =
+ self->entry->data.normal.icon_alpha;
self->a_icon->texture[0].data.rgba.data =
self->entry->data.normal.icon_data;
self->a_icon->surface.parent = item_a;
if (e->entry->data.separator.label != NULL) {
e->a_text_title->texture[0].data.text.string =
e->entry->data.separator.label;
- tw = RrMinWidth(e->a_text_title);
+ tw = RrMinWidth(e->a_text_title) + 2*ob_rr_theme->paddingx;
tw = MIN(tw, MAX_MENU_WIDTH);
th = ob_rr_theme->menu_title_height +
(ob_rr_theme->mbwidth - PADDING) *2;
/* grab the pointer in such a way as to pass through "owner events"
so that we can get enter/leave notifies in the menu. */
- if (!grab_pointer(TRUE, TRUE, OB_CURSOR_POINTER))
+ if (!grab_pointer(TRUE, FALSE, OB_CURSOR_POINTER))
return FALSE;
- if (!grab_keyboard(TRUE)) {
- grab_pointer(FALSE, TRUE, OB_CURSOR_POINTER);
+ if (!grab_keyboard()) {
+ ungrab_pointer();
return FALSE;
}
}
return TRUE;
}
-void menu_frame_hide(ObMenuFrame *self)
+static void menu_frame_hide(ObMenuFrame *self)
{
GList *it = g_list_find(menu_frame_visible, self);
if (menu_frame_visible == NULL) {
/* last menu shown */
- grab_pointer(FALSE, TRUE, OB_CURSOR_NONE);
- grab_keyboard(FALSE);
+ ungrab_pointer();
+ ungrab_keyboard();
}
XUnmapWindow(ob_display, self->window);