X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=658b05dbff00abb689201016730451598587c89b;hb=08e42acaadf8868abb94dc75da0daa9c6e4e2d1c;hp=c0323c2628d15f0b993f9b0cb587cfdbeba6a3fd;hpb=fce7d9b21ed039f32cde5f4fb6caa179e8c7e922;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index c0323c26..658b05db 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -970,6 +970,7 @@ static void client_get_all(ObClient *self) client_update_strut(self); client_update_icons(self); client_update_user_time(self); + client_update_icon_geometry(self); } static void client_get_startup_id(ObClient *self) @@ -2022,6 +2023,22 @@ void client_update_user_time(ObClient *self) } } +void client_update_icon_geometry(ObClient *self) +{ + guint num; + guint32 *data; + + RECT_SET(self->icon_geometry, 0, 0, 0, 0); + + if (PROP_GETA32(self->window, net_wm_icon_geometry, cardinal, &data, &num) + && num == 4) + { + /* don't let them set it with an area < 0 */ + RECT_SET(self->icon_geometry, data[0], data[1], + MAX(data[2],0), MAX(data[3],0)); + } +} + static void client_get_client_machine(ObClient *self) { gchar *data = NULL; @@ -2707,9 +2724,23 @@ static void client_iconify_recursive(ObClient *self, if (changed) { client_change_state(self); - client_showhide(self); - if (STRUT_EXISTS(self->strut)) - screen_update_areas(); + if (iconic) { + if (ob_state() != OB_STATE_STARTING && config_animate_iconify) { + /* delay the showhide until the window is done the animation */ + frame_begin_iconify_animation + (self->frame, iconic, + (ObFrameIconifyAnimateFunc)client_showhide, self); + /* but focus a new window now please */ + focus_fallback(TRUE); + } else + client_showhide(self); + } else { + if (config_animate_iconify) + /* start the animation then show it, this way the whole window + doesnt get shown, just the first step of the animation */ + frame_begin_iconify_animation(self->frame, iconic, NULL, NULL); + client_showhide(self); + } } /* iconify all direct transients, and deiconify all transients @@ -3261,7 +3292,7 @@ void client_activate(ObClient *self, gboolean here, gboolean user) event_halt_focus_delay(); if (client_normal(self) && screen_showing_desktop) - screen_show_desktop(FALSE); + screen_show_desktop(FALSE, FALSE); if (self->iconic) client_iconify(self, FALSE, here); if (self->desktop != DESKTOP_ALL &&