all repos — openbox @ d30809e5faf681a00035d9913a762f25db8de6b5

openbox fork - make it a bit more like ryudo

always ignore errors for client_focus like we used to.
Dana Jansens danakj@orodu.net
commit

d30809e5faf681a00035d9913a762f25db8de6b5

parent

d3e524420f87b3aedaf3076f3677cb1c3213f06f

M openbox/action.copenbox/action.c

@@ -1296,7 +1296,7 @@ /* if using focus_delay, stop the timer now so that focus doesn't

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
M openbox/client.copenbox/client.c

@@ -2842,7 +2842,7 @@ client_calc_layer(self);

if (fs) { /* try focus us when we go into fullscreen mode */ - client_focus(self, FALSE); + client_focus(self); } }

@@ -3336,7 +3336,7 @@

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 @@ */

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 @@ ce.xclient.data.l[4] = 0l;

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 @@ client_shade(self, FALSE);

if (raise) stacking_raise(CLIENT_AS_WINDOW(self)); - client_focus(self, FALSE); + client_focus(self); } void client_activate(ObClient *self, gboolean here, gboolean user)
M openbox/client.hopenbox/client.h

@@ -531,11 +531,8 @@ /*! Returns what client_focus would return if passed the same client, but

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.
M openbox/event.copenbox/event.c

@@ -1693,7 +1693,7 @@ Time old = event_curtime;

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;
M openbox/focus.copenbox/focus.c

@@ -201,7 +201,7 @@ if (config_focus_follow && !config_focus_last)

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 @@ ob_debug_type(OB_DEBUG_FOCUS, "trying omnipresentness\n");

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 @@ */

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 @@ backup fallback though)

*/ 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;
M openbox/openbox.copenbox/openbox.c

@@ -311,7 +311,7 @@ net_active_window, window, &xid) &&

(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;
M openbox/screen.copenbox/screen.c

@@ -942,7 +942,7 @@ for (it = focus_order; it; it = g_list_next(it)) {

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; } }