X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=fa9e8e9d9ab1ab59e1c93a9670f2615c663232e2;hb=6a79805b7c4116ee6ced87e78fb488f3274098ef;hp=c6dd02fa3d8ec5a9e9ac21bfdab645207bbd6cc4;hpb=18c2737a2fb3b3c85623dae5d2265d3a97c347e8;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index c6dd02fa..fa9e8e9d 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -45,6 +45,7 @@ static ObMenuEntryFrame* menu_entry_frame_new(ObMenuEntry *entry, 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) @@ -498,6 +499,8 @@ static void menu_entry_frame_render(ObMenuEntryFrame *self) 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; @@ -914,10 +917,10 @@ static gboolean menu_frame_show(ObMenuFrame *self) /* 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; } } @@ -1013,7 +1016,7 @@ gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent, return TRUE; } -void menu_frame_hide(ObMenuFrame *self) +static void menu_frame_hide(ObMenuFrame *self) { GList *it = g_list_find(menu_frame_visible, self); @@ -1035,8 +1038,8 @@ void menu_frame_hide(ObMenuFrame *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); @@ -1055,6 +1058,8 @@ void menu_frame_hide_all() } if ((it = g_list_last(menu_frame_visible))) menu_frame_hide(it->data); + + menu_clear_pipe_caches(); } void menu_frame_hide_all_client(ObClient *client) @@ -1065,6 +1070,8 @@ void menu_frame_hide_all_client(ObClient *client) if (f->client == client) menu_frame_hide(f); } + + menu_clear_pipe_caches(); }