make _NET_ACTIVE_WINDOW requests look at the timestamp when the user didn't

request it
This commit is contained in:
Dana Jansens 2007-03-11 14:17:14 +00:00
parent 6a61f0c433
commit 2c98204dfe
2 changed files with 9 additions and 5 deletions

View file

@ -1859,6 +1859,8 @@ void client_update_user_time(ObClient *self, gboolean new_event)
*/ */
if (new_event) if (new_event)
client_last_user_time = time; client_last_user_time = time;
/*ob_debug("window 0x%x user time %u\n", self->window, time);*/
} }
} }
@ -2950,14 +2952,17 @@ void client_unfocus(ObClient *self)
} }
} }
void client_activate(ObClient *self, gboolean here, gboolean user, void client_activate(ObClient *self, gboolean here, gboolean user, Time time)
Time timestamp)
{ {
/* XXX do some stuff here if user is false to determine if we really want /* XXX do some stuff here if user is false to determine if we really want
to activate it or not (a parent or group member is currently to activate it or not (a parent or group member is currently
active)? active)?
*/ */
if (!user) ob_debug("Want to activate window 0x%x with time %u (last time %u), "
"source=%s\n",
self->window, time, client_last_user_time,
(user ? "user" : "application"));
if (!user && time && time < client_last_user_time)
client_hilite(self, TRUE); client_hilite(self, TRUE);
else { else {
if (client_normal(self) && screen_showing_desktop) if (client_normal(self) && screen_showing_desktop)

View file

@ -486,8 +486,7 @@ void client_unfocus(ObClient *self);
otherwise, it means an application requested it on its own otherwise, it means an application requested it on its own
@param timestamp The time at which the activate was requested. @param timestamp The time at which the activate was requested.
*/ */
void client_activate(ObClient *self, gboolean here, gboolean user, void client_activate(ObClient *self, gboolean here, gboolean user, Time time);
Time timestamp);
/*! Calculates the stacking layer for the client window */ /*! Calculates the stacking layer for the client window */
void client_calc_layer(ObClient *self); void client_calc_layer(ObClient *self);