GList *client_list = NULL;
-static GSList *client_destructors = NULL;
+static GSList *client_destroy_notifies = NULL;
static GSList *client_hide_notifies = NULL;
static void client_get_all(ObClient *self, gboolean real);
static GSList *client_search_all_top_parents_internal(ObClient *self,
gboolean bylayer,
ObStackingLayer layer);
-static void client_call_callbacks(ObClient *self, GSList *list);
+static void client_call_notifies(ObClient *self, GSList *list);
void client_startup(gboolean reconfig)
{
if (reconfig) return;
}
-static void client_call_callbacks(ObClient *self, GSList *list)
+static void client_call_notifies(ObClient *self, GSList *list)
{
GSList *it;
}
}
-void client_add_destructor(ObClientCallback func, gpointer data)
+void client_add_destroy_notify(ObClientCallback func, gpointer data)
{
ClientCallback *d = g_new(ClientCallback, 1);
d->func = func;
d->data = data;
- client_destructors = g_slist_prepend(client_destructors, d);
+ client_destroy_notifies = g_slist_prepend(client_destroy_notifies, d);
}
-void client_remove_destructor(ObClientCallback func)
+void client_remove_destroy_notify(ObClientCallback func)
{
GSList *it;
- for (it = client_destructors; it; it = g_slist_next(it)) {
+ for (it = client_destroy_notifies; it; it = g_slist_next(it)) {
ClientCallback *d = it->data;
if (d->func == func) {
g_free(d);
- client_destructors = g_slist_delete_link(client_destructors, it);
+ client_destroy_notifies =
+ g_slist_delete_link(client_destroy_notifies, it);
break;
}
}
ClientCallback *d = g_new(ClientCallback, 1);
d->func = func;
d->data = data;
- client_hide_notifies = g_slist_prepend(client_destructors, d);
+ client_hide_notifies = g_slist_prepend(client_hide_notifies, d);
}
void client_remove_hide_notify(ObClientCallback func)
if (STRUT_EXISTS(self->strut))
screen_update_areas();
- client_call_callbacks(self, client_destructors);
+ client_call_notifies(self, client_destroy_notifies);
/* tell our parent(s) that we're gone */
if (self->transient_for == OB_TRAN_GROUP) { /* transient of group */
if (!client_should_show(self)) {
frame_hide(self->frame);
- client_call_callbacks(self, client_hide_notifies);
+ client_call_notifies(self, client_hide_notifies);
}
/* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it
else {
frame_hide(self->frame);
- client_call_callbacks(self, client_hide_notifies);
+ client_call_notifies(self, client_hide_notifies);
}
/* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it
"Focusing client \"%s\" at time %u\n",
self->title, event_curtime);
+ /* if there is a grab going on, then we need to cancel it. if we move
+ focus during the grab, applications will get NotifyWhileGrabbed events
+ and ignore them !
+
+ actions should not rely on being able to move focus during an
+ interactive grab.
+ */
+ if (keyboard_interactively_grabbed())
+ keyboard_interactive_cancel();
+
if (self->can_focus) {
/* This can cause a BadMatch error with CurrentTime, or if an app
passed in a bad time for _NET_WM_ACTIVE_WINDOW. */