diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 18d5591d..53a92989 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #define _XOPEN_SOURCE 700 | 1 | #define _XOPEN_SOURCE 700 |
2 | #define _POSIX_C_SOURCE 199309L | 2 | #define _POSIX_C_SOURCE 199309L |
3 | #include <assert.h> | 3 | #include <assert.h> |
4 | #include <errno.h> | ||
4 | #ifdef __linux__ | 5 | #ifdef __linux__ |
5 | #include <linux/input-event-codes.h> | 6 | #include <linux/input-event-codes.h> |
6 | #elif __FreeBSD__ | 7 | #elif __FreeBSD__ |
@@ -701,8 +702,14 @@ void seat_set_focus_warp(struct sway_seat *seat, | |||
701 | config->urgent_timeout > 0) { | 702 | config->urgent_timeout > 0) { |
702 | view->urgent_timer = wl_event_loop_add_timer(server.wl_event_loop, | 703 | view->urgent_timer = wl_event_loop_add_timer(server.wl_event_loop, |
703 | handle_urgent_timeout, view); | 704 | handle_urgent_timeout, view); |
704 | wl_event_source_timer_update(view->urgent_timer, | 705 | if (view->urgent_timer) { |
705 | config->urgent_timeout); | 706 | wl_event_source_timer_update(view->urgent_timer, |
707 | config->urgent_timeout); | ||
708 | } else { | ||
709 | wlr_log(WLR_ERROR, "Unable to create urgency timer (%s)", | ||
710 | strerror(errno)); | ||
711 | handle_urgent_timeout(view); | ||
712 | } | ||
706 | } else { | 713 | } else { |
707 | view_set_urgent(view, false); | 714 | view_set_urgent(view, false); |
708 | } | 715 | } |