diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index aa46940d..a4e06c57 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -1499,16 +1499,22 @@ bool seatop_allows_set_cursor(struct sway_seat *seat) { | |||
1499 | } | 1499 | } |
1500 | 1500 | ||
1501 | struct sway_keyboard_shortcuts_inhibitor * | 1501 | struct sway_keyboard_shortcuts_inhibitor * |
1502 | keyboard_shortcuts_inhibitor_get_for_focused_surface( | 1502 | keyboard_shortcuts_inhibitor_get_for_surface( |
1503 | const struct sway_seat *seat) { | 1503 | const struct sway_seat *seat, |
1504 | struct wlr_surface *focused_surface = | 1504 | const struct wlr_surface *surface) { |
1505 | seat->wlr_seat->keyboard_state.focused_surface; | ||
1506 | struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor = NULL; | 1505 | struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor = NULL; |
1507 | wl_list_for_each(sway_inhibitor, &seat->keyboard_shortcuts_inhibitors, link) { | 1506 | wl_list_for_each(sway_inhibitor, &seat->keyboard_shortcuts_inhibitors, link) { |
1508 | if (sway_inhibitor->inhibitor->surface == focused_surface) { | 1507 | if (sway_inhibitor->inhibitor->surface == surface) { |
1509 | return sway_inhibitor; | 1508 | return sway_inhibitor; |
1510 | } | 1509 | } |
1511 | } | 1510 | } |
1512 | 1511 | ||
1513 | return NULL; | 1512 | return NULL; |
1514 | } | 1513 | } |
1514 | |||
1515 | struct sway_keyboard_shortcuts_inhibitor * | ||
1516 | keyboard_shortcuts_inhibitor_get_for_focused_surface( | ||
1517 | const struct sway_seat *seat) { | ||
1518 | return keyboard_shortcuts_inhibitor_get_for_surface(seat, | ||
1519 | seat->wlr_seat->keyboard_state.focused_surface); | ||
1520 | } | ||