]> Dogcows Code - chaz/openbox/commitdiff
always ignore errors for client_focus like we used to.
authorDana Jansens <danakj@orodu.net>
Tue, 15 May 2007 17:38:52 +0000 (17:38 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 15 May 2007 17:38:52 +0000 (17:38 +0000)
openbox/action.c
openbox/client.c
openbox/client.h
openbox/event.c
openbox/focus.c
openbox/openbox.c
openbox/screen.c

index 13152f72d9b1382ba3796319db624c9ec3cb1dad..5900de7cd0c3ae05772317208457a25579afc20c 100644 (file)
@@ -1296,7 +1296,7 @@ void action_focus(union ActionData *data)
                go moving on us */
             event_halt_focus_delay();
 
-            client_focus(data->client.any.c, FALSE);
+            client_focus(data->client.any.c);
         }
     } else {
         /* focus action on something other than a client, make keybindings
index fa4aae9545c37258bcb90056f125bd7092a99c88..dba7706be0a057baf15b881bcaff133c1474e919 100644 (file)
@@ -2842,7 +2842,7 @@ void client_fullscreen(ObClient *self, gboolean fs)
 
     if (fs) {
         /* try focus us when we go into fullscreen mode */
-        client_focus(self, FALSE);
+        client_focus(self);
     }
 }
 
@@ -3336,7 +3336,7 @@ gboolean client_can_focus(ObClient *self)
     return TRUE;
 }
 
-gboolean client_focus(ObClient *self, gboolean checkinvalid)
+gboolean client_focus(ObClient *self)
 {
     /* choose the correct target */
     self = client_focus_target(self);
@@ -3363,8 +3363,7 @@ gboolean client_focus(ObClient *self, gboolean checkinvalid)
     if (keyboard_interactively_grabbed())
         keyboard_interactive_cancel();
 
-    if (checkinvalid)
-        xerror_set_ignore(TRUE);
+    xerror_set_ignore(TRUE);
     xerror_occured = FALSE;
 
     if (self->can_focus) {
@@ -3389,8 +3388,7 @@ gboolean client_focus(ObClient *self, gboolean checkinvalid)
         XSendEvent(ob_display, self->window, FALSE, NoEventMask, &ce);
     }
 
-    if (checkinvalid)
-        xerror_set_ignore(FALSE);
+    xerror_set_ignore(FALSE);
 
     return !xerror_occured;
 }
@@ -3426,7 +3424,7 @@ static void client_present(ObClient *self, gboolean here, gboolean raise)
     if (raise)
         stacking_raise(CLIENT_AS_WINDOW(self));
 
-    client_focus(self, FALSE);
+    client_focus(self);
 }
 
 void client_activate(ObClient *self, gboolean here, gboolean user)
index 9019c62dcc863691b86e1a36ebdadee769bfeafd..0f584a7733d2f7e49cffc601cd4977c42adba0e7 100644 (file)
@@ -531,11 +531,8 @@ ObClient *client_focus_target(ObClient *self);
   without focusing it or modifying the focus order lists. */
 gboolean client_can_focus(ObClient *self);
 
-/*! Attempt to focus the client window
-  If you care if focus actually went to the window or not, pass checkinvalid
-  as TRUE.
- */
-gboolean client_focus(ObClient *self, gboolean checkinvalid);
+/*! Attempt to focus the client window */
+gboolean client_focus(ObClient *self);
 
 /*! Activates the client for use, focusing, uniconifying it, etc. To be used
   when the user deliberately selects a window for use.
index 1fa5e11f601538f45784631fffda7571078a5179..b1e61f77c839bedcd71b77fdb216de292385623b 100644 (file)
@@ -1693,7 +1693,7 @@ static gboolean focus_delay_func(gpointer data)
 
     event_curtime = d->time;
     if (focus_client != d->client) {
-        if (client_focus(d->client, FALSE) && config_focus_raise)
+        if (client_focus(d->client) && config_focus_raise)
             stacking_raise(CLIENT_AS_WINDOW(d->client));
     }
     event_curtime = old;
index 60e6ea99e6f4f3a58162b97041f224d207801ba6..301e5ddfa9eaa1e482a73b72a3018d591e753d98 100644 (file)
@@ -201,7 +201,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus)
         if ((c = client_under_pointer()) &&
             (allow_refocus || c != old) &&
             (client_normal(c) &&
-             client_focus(c, TRUE)))
+             client_focus(c)))
         {
             ob_debug_type(OB_DEBUG_FOCUS, "found in pointer stuff\n");
             return c;
@@ -211,7 +211,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus)
     if (allow_refocus && old &&
         old->desktop == DESKTOP_ALL &&
         client_normal(old) &&
-        client_focus(old, TRUE))
+        client_focus(old))
     {
         ob_debug_type(OB_DEBUG_FOCUS, "found in omnipresentness\n");
         return old;
@@ -231,7 +231,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus)
         if (c->desktop == screen_desktop &&
             client_normal(c) &&
             (allow_refocus || c != old) &&
-            client_focus(c, TRUE))
+            client_focus(c))
         {
             ob_debug_type(OB_DEBUG_FOCUS, "found in focus order\n");
             return c;
@@ -250,7 +250,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus)
         */
         if (c->type == OB_CLIENT_TYPE_DESKTOP &&
             (allow_refocus || c != old) &&
-            client_focus(c, TRUE))
+            client_focus(c))
         {
             ob_debug_type(OB_DEBUG_FOCUS, "found a desktop window\n");
             return c;
index 419d2b55f932f65d0a3de4d52986da4c1b8e004e..78b5322373021c7e6267be94059a133c15089dda 100644 (file)
@@ -311,7 +311,7 @@ gint main(gint argc, gchar **argv)
                     (w = g_hash_table_lookup(window_map, &xid)) &&
                     WINDOW_IS_CLIENT(w))
                 {
-                    client_focus(WINDOW_AS_CLIENT(w), FALSE);
+                    client_focus(WINDOW_AS_CLIENT(w));
                 }
             } else {
                 GList *it;
index 23821301274908a349a4796f0c8fec0ebab05b09..452462979c663e868e5b85981908fc344b17c48f 100644 (file)
@@ -942,7 +942,7 @@ void screen_show_desktop(gboolean show, ObClient *show_only)
             ObClient *c = it->data;
             if (c->type == OB_CLIENT_TYPE_DESKTOP &&
                 (c->desktop == screen_desktop || c->desktop == DESKTOP_ALL) &&
-                client_focus(it->data, FALSE))
+                client_focus(it->data))
                 break;
         }
     }
This page took 0.037153 seconds and 4 git commands to generate.