self->can_focus = TRUE;
if ((hints = XGetWMHints(ob_display, self->window)) != NULL) {
+ gboolean ur;
+
if (hints->flags & InputHint)
self->can_focus = hints->input;
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;
/* 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,
/*! Demands attention flag */
gboolean demands_attention;
+ /*! The urgent flag */
+ gboolean urgent;
+
/*! The layer in which the window will be stacked, windows in lower layers
are always below windows in higher layers. */
ObStackingLayer layer;