static void client_get_all(ObClient *self);
static void client_toggle_border(ObClient *self, gboolean show);
static void client_get_all(ObClient *self);
static void client_toggle_border(ObClient *self, gboolean show);
self->wmstate = WithdrawnState; /* make sure it gets updated first time */
self->layer = -1;
self->desktop = screen_num_desktops; /* always an invalid value */
self->wmstate = WithdrawnState; /* make sure it gets updated first time */
self->layer = -1;
self->desktop = screen_num_desktops; /* always an invalid value */
/* per-app settings override stuff, and return the settings for other
uses too */
settings = client_get_settings_state(self);
/* per-app settings override stuff, and return the settings for other
uses too */
settings = client_get_settings_state(self);
/* This is focus stealing prevention */
ob_debug("Want to focus new window 0x%x with time %u (last time %u)\n",
/* This is focus stealing prevention */
ob_debug("Want to focus new window 0x%x with time %u (last time %u)\n",
/* if the client isn't focused, then hilite it so the user
knows it is there */
client_hilite(self, TRUE);
/* if the client isn't focused, then hilite it so the user
knows it is there */
client_hilite(self, TRUE);
client_update_sm_client_id(self);
client_update_strut(self);
client_update_icons(self);
client_update_sm_client_id(self);
client_update_strut(self);
client_update_icons(self);
{
guint32 time;
if (PROP_GET32(self->window, net_wm_user_time, cardinal, &time)) {
{
guint32 time;
if (PROP_GET32(self->window, net_wm_user_time, cardinal, &time)) {
/* we set this every time, not just when it grows, because in practice
sometimes time goes backwards! (ntpdate.. yay....) so.. if it goes
backward we don't want all windows to stop focusing. we'll just
assume noone is setting times older than the last one, cuz that
would be pretty stupid anyways
/* we set this every time, not just when it grows, because in practice
sometimes time goes backwards! (ntpdate.. yay....) so.. if it goes
backward we don't want all windows to stop focusing. we'll just
assume noone is setting times older than the last one, cuz that
would be pretty stupid anyways
- However! This is called when a window is mapped to get its user time
- but it's an old number, it's not changing it from new user
- interaction, so in that case, don't change the last user time.
- ob_debug("Focusing client \"%s\" at time %u\n", self->title, event_curtime);
+ ob_debug_type(OB_DEBUG_FOCUS,
+ "Focusing client \"%s\" at time %u\n",
+ self->title, event_curtime);
XSetInputFocus(ob_display, self->window, RevertToPointerRoot,
event_curtime);
XSetInputFocus(ob_display, self->window, RevertToPointerRoot,
event_curtime);
/* 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
active)?
*/
ob_debug("Want to activate window 0x%x with time %u (last time %u), "
"source=%s\n",
/* 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
active)?
*/
ob_debug("Want to activate window 0x%x with time %u (last time %u), "
"source=%s\n",
- self->window, event_curtime, client_last_user_time,
+ self->window, event_curtime, last_time,
- if (!user && event_curtime &&
- !event_time_after(event_curtime, client_last_user_time))
+
+ if (!user && event_curtime && last_time &&
+ !event_time_after(event_curtime, last_time))