diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-02 23:03:43 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-02 23:03:43 +0000 |
| commit | 80117db6c4f39af1cff247de5a3eb19e2f07c21b (patch) | |
| tree | e315656bff103673a789cf3202f34b2726a7db28 /openbox/client.c | |
| parent | 1d9c0e8b87e853a49dadc90c4c1ae12e77c63360 (diff) | |
turn on demands_attention when urgent gets set, and turn it off when urgent is removed, for those apps that think it is 1917 or something
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/openbox/client.c b/openbox/client.c index 5e1a7851..27470d34 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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; @@ -2775,11 +2784,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, |
