diff options
author | Orestis Floros <orestisflo@gmail.com> | 2023-09-05 21:59:53 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2023-09-06 17:24:53 +0200 |
commit | 82b9821204901e6a3dd4cec5bcd8ef52e5dd12fe (patch) | |
tree | cef8025d488ba517c6d7757b7f680912e84a3bd2 /src | |
parent | c1c405f4fc292321d8ef810b82d48abbbdb7b1a1 (diff) | |
download | i3-82b9821204901e6a3dd4cec5bcd8ef52e5dd12fe.tar.gz i3-82b9821204901e6a3dd4cec5bcd8ef52e5dd12fe.zip |
Remanage window after urgency flag change
Fixes #5658
Diffstat (limited to 'src')
-rw-r--r-- | src/handlers.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/handlers.c b/src/handlers.c index 17968a43..6ba11708 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -422,6 +422,7 @@ static void handle_configure_request(xcb_configure_request_event_t *event) { } else if (config.focus_on_window_activation == FOWA_URGENT || (config.focus_on_window_activation == FOWA_SMART && !workspace_is_visible(workspace))) { DLOG("Marking con = %p urgent\n", con); con_set_urgency(con, true); + con = remanage_window(con); tree_render(); } else { DLOG("Ignoring request for con = %p.\n", con); @@ -691,12 +692,16 @@ static void handle_client_message(xcb_client_message_event_t *event) { } } 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) + 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 = remanage_window(con); + } 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 = remanage_window(con); + } else if (event->data.data32[0] == _NET_WM_STATE_TOGGLE) { con_set_urgency(con, !con->urgent); + con = remanage_window(con); + } } else if (event->data.data32[1] == A__NET_WM_STATE_STICKY) { DLOG("Received a client message to modify _NET_WM_STATE_STICKY.\n"); if (event->data.data32[0] == _NET_WM_STATE_ADD) @@ -763,6 +768,7 @@ static void handle_client_message(xcb_client_message_event_t *event) { } else if (config.focus_on_window_activation == FOWA_URGENT || (config.focus_on_window_activation == FOWA_SMART && !workspace_is_visible(ws))) { DLOG("Marking con = %p urgent\n", con); con_set_urgency(con, true); + con = remanage_window(con); } else DLOG("Ignoring request for con = %p.\n", con); } @@ -982,6 +988,7 @@ static bool handle_hints(Con *con, xcb_get_property_reply_t *reply) { bool urgency_hint; window_update_hints(con->window, reply, &urgency_hint); con_set_urgency(con, urgency_hint); + remanage_window(con); tree_render(); return true; } |