summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-15 17:38:52 +0000
committerDana Jansens <danakj@orodu.net>2007-05-15 17:38:52 +0000
commitd30809e5faf681a00035d9913a762f25db8de6b5 (patch)
tree87c0473ba291affb368c2fdaeab41f5e62660150
parentd3e524420f87b3aedaf3076f3677cb1c3213f06f (diff)
always ignore errors for client_focus like we used to.
-rw-r--r--openbox/action.c2
-rw-r--r--openbox/client.c12
-rw-r--r--openbox/client.h7
-rw-r--r--openbox/event.c2
-rw-r--r--openbox/focus.c8
-rw-r--r--openbox/openbox.c2
-rw-r--r--openbox/screen.c2
7 files changed, 15 insertions, 20 deletions
diff --git a/openbox/action.c b/openbox/action.c
index 13152f72..5900de7c 100644
--- a/openbox/action.c
+++ b/openbox/action.c
@@ -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
diff --git a/openbox/client.c b/openbox/client.c
index fa4aae95..dba7706b 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -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)
diff --git a/openbox/client.h b/openbox/client.h
index 9019c62d..0f584a77 100644
--- a/openbox/client.h
+++ b/openbox/client.h
@@ -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.
diff --git a/openbox/event.c b/openbox/event.c
index 1fa5e11f..b1e61f77 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -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;
diff --git a/openbox/focus.c b/openbox/focus.c
index 60e6ea99..301e5ddf 100644
--- a/openbox/focus.c
+++ b/openbox/focus.c
@@ -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;
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 419d2b55..78b53223 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -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;
diff --git a/openbox/screen.c b/openbox/screen.c
index 23821301..45246297 100644
--- a/openbox/screen.c
+++ b/openbox/screen.c
@@ -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;
}
}