]> Dogcows Code - chaz/openbox/commitdiff
when restoring from show-desktop mode because a window is going to be focused, then...
authorDana Jansens <danakj@orodu.net>
Sat, 5 May 2007 02:48:39 +0000 (02:48 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 5 May 2007 02:48:39 +0000 (02:48 +0000)
openbox/action.c
openbox/client.c
openbox/event.c
openbox/screen.c
openbox/screen.h

index 1af396a495a42c9cdff9d53e85496acf268b202f..b54e888eec34a8e5d8679b7c43fc2ad433438768 100644 (file)
@@ -1932,17 +1932,17 @@ void action_toggle_dockautohide(union ActionData *data)
 
 void action_toggle_show_desktop(union ActionData *data)
 {
-    screen_show_desktop(!screen_showing_desktop);
+    screen_show_desktop(!screen_showing_desktop, TRUE);
 }
 
 void action_show_desktop(union ActionData *data)
 {
-    screen_show_desktop(TRUE);
+    screen_show_desktop(TRUE, TRUE);
 }
 
 void action_unshow_desktop(union ActionData *data)
 {
-    screen_show_desktop(FALSE);
+    screen_show_desktop(FALSE, TRUE);
 }
 
 void action_break_chroot(union ActionData *data)
index c0323c2628d15f0b993f9b0cb587cfdbeba6a3fd..3ebcc69ae8f568a0d6c5deafb129b464f8763ec8 100644 (file)
@@ -3261,7 +3261,7 @@ void client_activate(ObClient *self, gboolean here, gboolean user)
         event_halt_focus_delay();
 
         if (client_normal(self) && screen_showing_desktop)
-            screen_show_desktop(FALSE);
+            screen_show_desktop(FALSE, FALSE);
         if (self->iconic)
             client_iconify(self, FALSE, here);
         if (self->desktop != DESKTOP_ALL &&
index efef0faa3e1f7c97c5f45f65f436aab9474d0932..badef3d97c3eca9c71a17162c69b1fa46934d9d3 100644 (file)
@@ -604,7 +604,7 @@ static void event_handle_root(XEvent *e)
             if (d > 0)
                 screen_set_num_desktops(d);
         } else if (msgtype == prop_atoms.net_showing_desktop) {
-            screen_show_desktop(e->xclient.data.l[0] != 0);
+            screen_show_desktop(e->xclient.data.l[0] != 0, TRUE);
         } else if (msgtype == prop_atoms.ob_control) {
             if (e->xclient.data.l[0] == 1)
                 ob_reconfigure();
index a302828baf1a7a293d87dc995e6efce2cbb687a5..8fdbe096f6b577c6035d116b27411a24622e6ab5 100644 (file)
@@ -860,7 +860,7 @@ void screen_update_desktop_names()
     }
 }
 
-void screen_show_desktop(gboolean show)
+void screen_show_desktop(gboolean show, gboolean restore_focus)
 {
     GList *it;
      
@@ -895,7 +895,7 @@ void screen_show_desktop(gboolean show)
                 client_focus(it->data))
                 break;
         }
-    } else {
+    } else if (restore_focus) {
         ObClient *c;
 
         /* use NULL for the "old" argument because the desktop was focused
index bedc2e6dd8e87a4dbc6a96d73fc38c64d0798e67..558081b5a308c06018ba6976904a5accf51e3d1e 100644 (file)
@@ -76,7 +76,7 @@ void screen_desktop_popup(guint d, gboolean show);
 
 /*! Shows and focuses the desktop and hides all the client windows, or
   returns to the normal state, showing client windows. */
-void screen_show_desktop(gboolean show);
+void screen_show_desktop(gboolean show, gboolean restore_focus);
 
 /*! Updates the desktop layout from the root property if available */
 void screen_update_layout();
This page took 0.034308 seconds and 4 git commands to generate.