summaryrefslogtreecommitdiff
path: root/openbox/client_menu.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-07 23:48:05 +0000
committerDana Jansens <danakj@orodu.net>2007-05-07 23:48:05 +0000
commit1fa08abd9c6674c14bf4088112e69a172ddf19b6 (patch)
tree6b77e5b476e32a39c53704aea13a7b55d668a611 /openbox/client_menu.c
parentfa332cc31474cf1337a0aba5b7d2e9bdd028d87c (diff)
um... hide the client menu when the window changes desktops. its not visible anymore (probably..) and no send to menu wont be wrong too.
Diffstat (limited to 'openbox/client_menu.c')
-rw-r--r--openbox/client_menu.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/openbox/client_menu.c b/openbox/client_menu.c
index 8375d396..11e31965 100644
--- a/openbox/client_menu.c
+++ b/openbox/client_menu.c
@@ -173,26 +173,8 @@ static void desktop_change_callback(ObClient *c, gpointer data)
{
ObMenuFrame *frame = data;
if (c == frame->client) {
- /* adding/removing entries while it's shown is not fun, so just hide
- the menu and reshow it */
- if (frame->parent) {
- ObMenuEntryFrame *me = frame->parent_entry;
- ObMenuFrame *parent = frame->parent;
- gint sel =
- g_list_position(frame->entries,
- g_list_find(frame->entries, frame->selected));
- menu_frame_select(parent, NULL, TRUE);
- menu_frame_select(parent, me, TRUE);
-
- frame = parent->child;
- /* reselect the same spot or the last one if it got shorter */
- sel = MIN(sel, (gint)g_list_length(frame->entries));
- if (sel >= 0)
- menu_frame_select(frame,
- g_list_nth(frame->entries, sel)->data,
- TRUE);
- } else
- menu_frame_hide(frame);
+ /* the client won't even be on the screen anymore, so hide the menu */
+ menu_frame_hide_all();
}
}