X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=e9fc32da0a946510e1d85e7b4f3a06a19cce01e1;hb=f189b02f857eb5cc80ca925ccb4b0e97c3614bcd;hp=62a68ae9fbdf43fdd99cdb5644ac2677e80d05c3;hpb=005eb35ee810fbc1edc31a83f298866067be6ef9;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 62a68ae9..e9fc32da 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1,7 +1,7 @@ /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- menuframe.c for the Openbox window manager - Copyright (c) 2004 Mikael Magnusson + Copyright (c) 2006 Mikael Magnusson Copyright (c) 2003 Ben Jansens This program is free software; you can redistribute it and/or modify @@ -67,9 +67,8 @@ ObMenuFrame* menu_frame_new(ObMenu *menu, ObClient *client) self->client = client; attr.event_mask = FRAME_EVENTMASK; - attr.save_under = True; self->window = createWindow(RootWindow(ob_display, ob_screen), - CWEventMask | CWSaveUnder, &attr); + CWEventMask, &attr); attr.event_mask = TITLE_EVENTMASK; self->title = createWindow(self->window, CWEventMask, &attr); self->items = createWindow(self->window, 0, NULL); @@ -251,6 +250,8 @@ static void menu_entry_frame_render(ObMenuEntryFrame *self) case OB_MENU_ENTRY_TYPE_SEPARATOR: th = SEPARATOR_HEIGHT + 2*PADDING; break; + default: + g_assert_not_reached(); } RECT_SET_SIZE(self->area, self->frame->inner_w, th); XResizeWindow(ob_display, self->window, @@ -675,13 +676,14 @@ void menu_frame_hide(ObMenuFrame *self) void menu_frame_hide_all() { + GList *it; + if (config_submenu_show_delay) { /* remove any submenu open requests */ ob_main_loop_timeout_remove(ob_main_loop, menu_entry_frame_submenu_timeout); } - GList *it = g_list_last(menu_frame_visible); - if (it) + if ((it = g_list_last(menu_frame_visible))) menu_frame_hide(it->data); }