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);
}
}
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)
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)
}
}
-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
*/
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)
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);
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) {
}
break;
case UnmapNotify:
+ ob_debug("UnmapNotify for window 0x%x\n", client->window);
if (client->ignore_unmaps) {
client->ignore_unmaps--;
break;
client_unmanage(client);
break;
case DestroyNotify:
+ ob_debug("DestroyNotify for window 0x%x\n", client->window);
client_unmanage(client);
break;
case ReparentNotify:
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 */
(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]);
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,
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;
}
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;
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;
}
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;
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;
/*! 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 */