X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=66ed0d9f415bb2bcbee7e8d4b2e3b5fd6532561d;hb=a3f8c5c45a1ff323fc088cc5af49ab48d5679e54;hp=d50388e775f624421bc502cb1fc1e3c1ea4b0c2a;hpb=f0e5332b4ae5504f167d75e853c13e6f718ce70a;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index d50388e7..66ed0d9f 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -64,7 +64,6 @@ typedef struct GList *client_list = NULL; static GSList *client_destructors = NULL; -static GSList *client_desktop_notifies = NULL; static void client_get_all(ObClient *self); static void client_toggle_border(ObClient *self, gboolean show); @@ -128,29 +127,6 @@ void client_remove_destructor(ObClientCallback func) } } -void client_add_desktop_notify(ObClientCallback func, gpointer data) -{ - ClientCallback *d = g_new(ClientCallback, 1); - d->func = func; - d->data = data; - client_desktop_notifies = g_slist_prepend(client_desktop_notifies, d); -} - -void client_remove_desktop_notify(ObClientCallback func) -{ - GSList *it; - - for (it = client_desktop_notifies; it; it = g_slist_next(it)) { - ClientCallback *d = it->data; - if (d->func == func) { - g_free(d); - client_desktop_notifies = - g_slist_delete_link(client_desktop_notifies, it); - break; - } - } -} - void client_set_list() { Window *windows, *win_it; @@ -1599,10 +1575,15 @@ void client_setup_decor_and_functions(ObClient *self) self->functions &= ~(OB_CLIENT_FUNC_ICONIFY | OB_CLIENT_FUNC_RESIZE); break; + case OB_CLIENT_TYPE_SPLASH: + /* these don't get get any decorations, and the only thing you can + do with them is move them */ + self->decorations = 0; + self->functions = OB_CLIENT_FUNC_MOVE; + case OB_CLIENT_TYPE_DESKTOP: case OB_CLIENT_TYPE_DOCK: - case OB_CLIENT_TYPE_SPLASH: - /* none of these windows are manipulated by the window manager */ + /* these windows are not manipulated by the window manager */ self->decorations = 0; self->functions = 0; break; @@ -2462,7 +2443,7 @@ static void client_apply_startup_state(ObClient *self, gint x, gint y) pos = TRUE; } - /* if the client didn't get positioned yet, then do so now + /* if the client didn't get positioned yet, then do so now. call client_move even if the window is not being moved anywhere, because when we reparent it and decorate it, it is getting moved and we need to be telling it so with a ConfigureNotify event. @@ -2814,7 +2795,9 @@ static void client_iconify_recursive(ObClient *self, self->window); if (iconic) { - if (self->functions & OB_CLIENT_FUNC_ICONIFY) { + /* don't let non-normal windows iconify along with their parents + or whatever */ + if (client_normal(self)) { self->iconic = iconic; /* update the focus lists.. iconic windows go to the bottom of @@ -3036,13 +3019,6 @@ void client_set_desktop_recursive(ObClient *self, client_raise(self); if (STRUT_EXISTS(self->strut)) screen_update_areas(); - - /* call the notifies */ - GSList *it; - for (it = client_desktop_notifies; it; it = g_slist_next(it)) { - ClientCallback *d = it->data; - d->func(self, d->data); - } } /* move all transients */