diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index eadf3b26..e77d88a8 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -677,14 +677,20 @@ void seat_set_focus_warp(struct sway_seat *seat, | |||
677 | } | 677 | } |
678 | } | 678 | } |
679 | 679 | ||
680 | // If urgent, start a timer to unset it | 680 | // If urgent, either unset the urgency or start a timer to unset it |
681 | if (container && container->type == C_VIEW && | 681 | if (container && container->type == C_VIEW && |
682 | view_is_urgent(container->sway_view) && | 682 | view_is_urgent(container->sway_view) && |
683 | !container->sway_view->urgent_timer) { | 683 | !container->sway_view->urgent_timer) { |
684 | struct sway_view *view = container->sway_view; | 684 | struct sway_view *view = container->sway_view; |
685 | view->urgent_timer = wl_event_loop_add_timer(server.wl_event_loop, | 685 | if (last_workspace && last_workspace != new_workspace && |
686 | handle_urgent_timeout, view); | 686 | config->urgent_timeout > 0) { |
687 | wl_event_source_timer_update(view->urgent_timer, 1000); | 687 | view->urgent_timer = wl_event_loop_add_timer(server.wl_event_loop, |
688 | handle_urgent_timeout, view); | ||
689 | wl_event_source_timer_update(view->urgent_timer, | ||
690 | config->urgent_timeout); | ||
691 | } else { | ||
692 | view_set_urgent(view, false); | ||
693 | } | ||
688 | } | 694 | } |
689 | 695 | ||
690 | // If we've focused a floating container, bring it to the front. | 696 | // If we've focused a floating container, bring it to the front. |