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
if (fs) {
/* try focus us when we go into fullscreen mode */
- client_focus(self, FALSE);
+ client_focus(self);
}
}
return TRUE;
}
-gboolean client_focus(ObClient *self, gboolean checkinvalid)
+gboolean client_focus(ObClient *self)
{
/* choose the correct target */
self = client_focus_target(self);
if (keyboard_interactively_grabbed())
keyboard_interactive_cancel();
- if (checkinvalid)
- xerror_set_ignore(TRUE);
+ xerror_set_ignore(TRUE);
xerror_occured = FALSE;
if (self->can_focus) {
XSendEvent(ob_display, self->window, FALSE, NoEventMask, &ce);
}
- if (checkinvalid)
- xerror_set_ignore(FALSE);
+ xerror_set_ignore(FALSE);
return !xerror_occured;
}
if (raise)
stacking_raise(CLIENT_AS_WINDOW(self));
- client_focus(self, FALSE);
+ client_focus(self);
}
void client_activate(ObClient *self, gboolean here, gboolean user)
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.
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;
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;
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;
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;
*/
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;
(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;
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;
}
}