X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=34ae4d868f5e770e7e58592f1ccd05cdb8967246;hb=d389e67d22259e6a1d822b99ab0dbd27389bdade;hp=5e1a78513992929a178fb871bfbffa0b89a1b3b2;hpb=97cbacd9e41ae2315434d6e83ce78502a881d54f;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 5e1a7851..34ae4d86 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -347,8 +347,8 @@ void client_manage(Window window) /* make sure the window is visible. */ client_find_onscreen(self, &newx, &newy, - self->frame->area.width, - self->frame->area.height, + self->area.width, + self->area.height, /* non-normal clients has less rules, and windows that are being restored from a session do also. we can assume you want @@ -742,8 +742,8 @@ void client_move_onscreen(ObClient *self, gboolean rude) gint x = self->area.x; gint y = self->area.y; if (client_find_onscreen(self, &x, &y, - self->frame->area.width, - self->frame->area.height, rude)) { + self->area.width, + self->area.height, rude)) { client_move(self, x, y); } } @@ -1622,6 +1622,8 @@ void client_update_wmhints(ObClient *self) self->can_focus = TRUE; if ((hints = XGetWMHints(ob_display, self->window)) != NULL) { + gboolean ur; + if (hints->flags & InputHint) self->can_focus = hints->input; @@ -1631,6 +1633,13 @@ void client_update_wmhints(ObClient *self) if (hints->flags & StateHint) self->iconic = hints->initial_state == IconicState; + ur = self->urgent; + self->urgent = (hints->flags & XUrgencyHint); + if (self->urgent && !ur) + client_hilite(self, TRUE); + else if (!self->urgent && ur && self->demands_attention) + client_hilite(self, FALSE); + if (!(hints->flags & WindowGroupHint)) hints->window_group = None; @@ -2624,10 +2633,11 @@ static void client_iconify_recursive(ObClient *self, screen_update_areas(); } - /* iconify all direct transients */ + /* iconify all direct transients, and deiconify all transients + (non-direct too) */ for (it = self->transients; it; it = g_slist_next(it)) if (it->data != self) - if (client_is_direct_child(self, it->data)) + if (client_is_direct_child(self, it->data) || !iconic) client_iconify_recursive(it->data, iconic, curdesk); } @@ -2775,11 +2785,13 @@ void client_hilite(ObClient *self, gboolean hilite) /* don't allow focused windows to hilite */ self->demands_attention = hilite && !client_focused(self); - if (self->demands_attention) - frame_flash_start(self->frame); - else - frame_flash_stop(self->frame); - client_change_state(self); + if (self->frame != NULL) { /* if we're mapping, just set the state */ + if (self->demands_attention) + frame_flash_start(self->frame); + else + frame_flash_stop(self->frame); + client_change_state(self); + } } void client_set_desktop_recursive(ObClient *self,