(user_time != 0) &&
/* this checks for focus=false for the window */
(!settings || settings->focus != 0) &&
- focus_valid_target(self, FALSE, FALSE, TRUE, FALSE, FALSE))
+ focus_valid_target(self, FALSE, FALSE, TRUE, FALSE, FALSE,
+ settings->focus == 1))
{
activate = TRUE;
}
if (!activate) {
/* if the client isn't stealing focus, then hilite it so the user
- knows it is there */
- /* XXX don't do this if we're restoring from a session */
- client_hilite(self, TRUE);
+ knows it is there, but don't do this if we're restoring from a
+ session */
+ if (!client_restore_session_stacking(self))
+ client_hilite(self, TRUE);
}
}
else {
gboolean hide = FALSE;
if (!client_should_show(self)) {
- if (self == focus_client) {
- event_cancel_all_key_grabs();
- }
-
/* We don't need to ignore enter events here.
The window can hide/iconify in 3 different ways:
1 - through an x message. in this case we ignore all enter events
go moving on us */
event_halt_focus_delay();
- event_cancel_all_key_grabs();
-
xerror_set_ignore(TRUE);
xerror_occured = FALSE;
}
/* this function exists to map to the net_active_window message in the ewmh */
-void client_activate(ObClient *self, gboolean here, gboolean raise,
+void client_activate(ObClient *self, gboolean desktop,
+ gboolean here, gboolean raise,
gboolean unshade, gboolean user)
{
- if ((user && (self->desktop == DESKTOP_ALL ||
+ if ((user && (desktop ||
+ self->desktop == DESKTOP_ALL ||
self->desktop == screen_desktop)) ||
client_can_steal_focus(self, event_curtime, CurrentTime))
{