]> Dogcows Code - chaz/openbox/blobdiff - openbox/client_menu.c
when un-showing the desktop if a window is getting shown, iconify the others so just...
[chaz/openbox] / openbox / client_menu.c
index 80feb2a15096215e166f817d74ab9491bdab5fc3..be44e45770b18515ab0c2c1059238fc8c631d0eb 100644 (file)
@@ -104,16 +104,17 @@ static void client_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
                                 ObClient *c, guint state, gpointer data,
                                 Time time)
 {
-    GList *it;
+    gint x, y;
 
     g_assert(c);
 
     switch (e->id) {
     case CLIENT_ICONIFY:
-        client_iconify(c, TRUE, FALSE);
         /* the client won't be on screen anymore so hide the menu */
         menu_frame_hide_all();
         f = NULL; /* and don't update */
+
+        client_iconify(c, TRUE, FALSE, FALSE);
         break;
     case CLIENT_RESTORE:
         client_maximize(c, FALSE, 0);
@@ -128,10 +129,22 @@ static void client_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
         client_set_undecorated(c, !c->undecorated);
         break;
     case CLIENT_MOVE:
-        moveresize_start(c,0,0,0, prop_atoms.net_wm_moveresize_move_keyboard);
+        /* this needs to grab the keyboard so hide the menu */
+        menu_frame_hide_all();
+        f = NULL; /* and don't update */
+
+        screen_pointer_pos(&x, &y);
+        moveresize_start(c, x, y, 0,
+                         prop_atoms.net_wm_moveresize_move_keyboard);
         break;
     case CLIENT_RESIZE:
-        moveresize_start(c,0,0,0,prop_atoms.net_wm_moveresize_size_keyboard);
+        /* this needs to grab the keyboard so hide the menu */
+        menu_frame_hide_all();
+        f = NULL; /* and don't update */
+
+        screen_pointer_pos(&x, &y);
+        moveresize_start(c, x, y, 0,
+                         prop_atoms.net_wm_moveresize_size_keyboard);
         break;
     case CLIENT_CLOSE:
         client_close(c);
@@ -187,13 +200,13 @@ static void layer_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
 
     switch (e->id) {
     case LAYER_TOP:
-        client_set_layer(f->client, 1);
+        client_set_layer(c, 1);
         break;
     case LAYER_NORMAL:
-        client_set_layer(f->client, 0);
+        client_set_layer(c, 0);
         break;
     case LAYER_BOTTOM:
-        client_set_layer(f->client, -1);
+        client_set_layer(c, -1);
         break;
     default:
         g_assert_not_reached();
This page took 0.023591 seconds and 4 git commands to generate.