- /* Check if the fullscreen state should be toggled */
- if ((con->fullscreen_mode != CF_NONE &&
- (event->data.data32[0] == _NET_WM_STATE_REMOVE ||
- event->data.data32[0] == _NET_WM_STATE_TOGGLE)) ||
- (con->fullscreen_mode == CF_NONE &&
- (event->data.data32[0] == _NET_WM_STATE_ADD ||
- event->data.data32[0] == _NET_WM_STATE_TOGGLE))) {
- DLOG("toggling fullscreen\n");
- con_toggle_fullscreen(con, CF_OUTPUT);
+ if (event->data.data32[1] == A__NET_WM_STATE_FULLSCREEN) {
+ /* Check if the fullscreen state should be toggled */
+ if ((con->fullscreen_mode != CF_NONE &&
+ (event->data.data32[0] == _NET_WM_STATE_REMOVE ||
+ event->data.data32[0] == _NET_WM_STATE_TOGGLE)) ||
+ (con->fullscreen_mode == CF_NONE &&
+ (event->data.data32[0] == _NET_WM_STATE_ADD ||
+ event->data.data32[0] == _NET_WM_STATE_TOGGLE))) {
+ DLOG("toggling fullscreen\n");
+ con_toggle_fullscreen(con, CF_OUTPUT);
+ }
+ } else if (event->data.data32[1] == A__NET_WM_STATE_DEMANDS_ATTENTION) {
+ /* Check if the urgent flag must be set or not */
+ if (event->data.data32[0] == _NET_WM_STATE_ADD)
+ con_set_urgency(con, true);
+ else if (event->data.data32[0] == _NET_WM_STATE_REMOVE)
+ con_set_urgency(con, false);
+ else if (event->data.data32[0] == _NET_WM_STATE_TOGGLE)
+ con_set_urgency(con, !con->urgent);