not passing timestamps sometimes and not others. set event_curtime when client messages provide a timestamp.
@@ -1149,8 +1149,7 @@ /* if using focus_delay, stop the timer now so that focus doesn't go
moving on us */ event_halt_focus_delay(); - client_activate(data->activate.any.c, data->activate.here, TRUE, - data->activate.any.time); + client_activate(data->activate.any.c, data->activate.here, TRUE); } }@@ -1632,8 +1631,7 @@ event_halt_focus_delay();
focus_cycle(data->cycle.forward, data->cycle.linear, data->any.interactive, data->cycle.dialog, - data->cycle.inter.final, data->cycle.inter.cancel, - data->cycle.inter.any.time); + data->cycle.inter.final, data->cycle.inter.cancel); } void action_directional_focus(union ActionData *data)@@ -1646,8 +1644,7 @@ focus_directional_cycle(data->interdiraction.direction,
data->any.interactive, data->interdiraction.dialog, data->interdiraction.inter.final, - data->interdiraction.inter.cancel, - data->interdiraction.inter.any.time); + data->interdiraction.inter.cancel); } void action_movetoedge(union ActionData *data)
@@ -3080,7 +3080,7 @@ focus_fallback(FALSE);
} } -void client_activate(ObClient *self, gboolean here, gboolean user, Time time) +void client_activate(ObClient *self, gboolean here, gboolean user) { /* 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@@ -3088,9 +3088,9 @@ active)?
*/ ob_debug("Want to activate window 0x%x with time %u (last time %u), " "source=%s\n", - self->window, time, client_last_user_time, + self->window, event_curtime, client_last_user_time, (user ? "user" : "application")); - if (!user && time && time < client_last_user_time) + if (!user && event_curtime && event_curtime < client_last_user_time) client_hilite(self, TRUE); else { if (client_normal(self) && screen_showing_desktop)
@@ -504,9 +504,8 @@ @param here If true, then the client is brought to the current desktop;
otherwise, the desktop is changed to where the client lives. @param user If true, then a user action is what requested the activation; otherwise, it means an application requested it on its own - @param timestamp The time at which the activate was requested. */ -void client_activate(ObClient *self, gboolean here, gboolean user, Time time); +void client_activate(ObClient *self, gboolean here, gboolean user); /*! Calculates the stacking layer for the client window */ void client_calc_layer(ObClient *self);
@@ -542,6 +542,7 @@
msgtype = e->xclient.message_type; if (msgtype == prop_atoms.net_current_desktop) { guint d = e->xclient.data.l[0]; + event_curtime = e->xclient.data.l[1]; if (d < screen_num_desktops) screen_set_desktop(d); } else if (msgtype == prop_atoms.net_number_of_desktops) {@@ -880,6 +881,7 @@ }
} break; case UnmapNotify: + ob_debug("UnmapNotify for window 0x%x\n", client->window); if (client->ignore_unmaps) { client->ignore_unmaps--; break;@@ -887,6 +889,7 @@ }
client_unmanage(client); break; case DestroyNotify: + ob_debug("DestroyNotify for window 0x%x\n", client->window); client_unmanage(client); break; case ReparentNotify:@@ -913,7 +916,7 @@ does, we don't want it!
it can happen now when the window is on another desktop, but we still don't want it! */ - client_activate(client, FALSE, TRUE, CurrentTime); + client_activate(client, FALSE, TRUE); break; case ClientMessage: /* validate cuz we query stuff off the client here */@@ -972,11 +975,11 @@ client->window,
(e->xclient.data.l[0] == 0 ? "unknown" : (e->xclient.data.l[0] == 1 ? "application" : (e->xclient.data.l[0] == 2 ? "user" : "INVALID")))); - /* XXX make use of data.l[1] and [2] ! */ + /* XXX make use of data.l[2] ! */ + event_curtime = e->xclient.data.l[1]; client_activate(client, FALSE, (e->xclient.data.l[0] == 0 || - e->xclient.data.l[0] == 2), - e->xclient.data.l[1]); + e->xclient.data.l[0] == 2)); } else if (msgtype == prop_atoms.net_wm_moveresize) { ob_debug("net_wm_moveresize for 0x%lx direction %d\n", client->window, e->xclient.data.l[2]);
@@ -59,7 +59,7 @@ /* end cycling if the target disappears. CurrentTime is fine, time won't
be used */ if (focus_cycle_target == client) - focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, CurrentTime); + focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); } static Window createWindow(Window parent, gulong mask,@@ -180,7 +180,7 @@ /* in the middle of cycling..? kill it. CurrentTime is fine, time won't
be used. */ if (focus_cycle_target) - focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, CurrentTime); + focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); old = focus_client; focus_client = client;@@ -497,7 +497,7 @@ return FALSE;
} void focus_cycle(gboolean forward, gboolean linear, gboolean interactive, - gboolean dialog, gboolean done, gboolean cancel, Time time) + gboolean dialog, gboolean done, gboolean cancel) { static ObClient *first = NULL; static ObClient *t = NULL;@@ -558,7 +558,7 @@ } while (it != start);
done_cycle: if (done && focus_cycle_target) - client_activate(focus_cycle_target, FALSE, TRUE, time); + client_activate(focus_cycle_target, FALSE, TRUE); t = NULL; first = NULL;@@ -575,8 +575,7 @@ return;
} void focus_directional_cycle(ObDirection dir, gboolean interactive, - gboolean dialog, gboolean done, gboolean cancel, - Time time) + gboolean dialog, gboolean done, gboolean cancel) { static ObClient *first = NULL; ObClient *ft = NULL;@@ -621,7 +620,7 @@
done_cycle: if (done && focus_cycle_target) - client_activate(focus_cycle_target, FALSE, TRUE, time); + client_activate(focus_cycle_target, FALSE, TRUE); first = NULL; focus_cycle_target = NULL;
@@ -58,10 +58,9 @@ void focus_fallback(gboolean allow_refocus);
/*! Cycle focus amongst windows. */ void focus_cycle(gboolean forward, gboolean linear, gboolean interactive, - gboolean dialog, gboolean done, gboolean cancel, Time time); + gboolean dialog, gboolean done, gboolean cancel); void focus_directional_cycle(ObDirection dir, gboolean interactive, - gboolean dialog, gboolean done, gboolean cancel, - Time time); + gboolean dialog, gboolean done, gboolean cancel); void focus_cycle_draw_indicator(); /*! Add a new client into the focus order */