aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-20 19:37:27 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-21 10:28:07 +1000
commitc2ed3d8bd6e2ec12f2ce70d7e106c09a7078e91f (patch)
treea1b879569d663c4b95c49985a877b87628dfb10f /sway/desktop/xwayland.c
parentMerge pull request #2318 from RedSoxFan/fix-output-wildcard (diff)
downloadsway-c2ed3d8bd6e2ec12f2ce70d7e106c09a7078e91f.tar.gz
sway-c2ed3d8bd6e2ec12f2ce70d7e106c09a7078e91f.tar.zst
sway-c2ed3d8bd6e2ec12f2ce70d7e106c09a7078e91f.zip
Implement force_display_urgency_hint
The directive sets the timeout before an urgent view becomes normal again after switching to it from another workspace. Also: * When an xwayland surface removes the urgent hint while the timer is active, we now ignore the request. This happens as soon as the view receives focus, so it was effectively making the timer pointless. * The timeout is now only applied when switching to it from another workspace.
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 72dc7ca2..bce0a37b 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -442,6 +442,12 @@ static void handle_set_hints(struct wl_listener *listener, void *data) {
442 if (!xsurface->mapped) { 442 if (!xsurface->mapped) {
443 return; 443 return;
444 } 444 }
445 if (!xsurface->hints_urgency && view->urgent_timer) {
446 // The view is is in the timeout period. We'll ignore the request to
447 // unset urgency so that the view remains urgent until the timer clears
448 // it.
449 return;
450 }
445 if (view->allow_request_urgent) { 451 if (view->allow_request_urgent) {
446 view_set_urgent(view, (bool)xsurface->hints_urgency); 452 view_set_urgent(view, (bool)xsurface->hints_urgency);
447 } 453 }