diff options
author | Ferdinand Schober <ferdinand.schober@fau.de> | 2022-10-08 19:11:45 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-10-09 10:07:51 +0200 |
commit | 99acdb4e62685ae618d79c6d4e735eee890947e6 (patch) | |
tree | 270c027681d7c15dbf6bc621a87d190d8c86b98b /sway/input/seat.c | |
parent | use seat directly (diff) | |
download | sway-99acdb4e62685ae618d79c6d4e735eee890947e6.tar.gz sway-99acdb4e62685ae618d79c6d4e735eee890947e6.tar.zst sway-99acdb4e62685ae618d79c6d4e735eee890947e6.zip |
Use keyboard_state.focused_surface directly
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 5b5741d1..b21e1b86 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -1462,17 +1462,6 @@ struct sway_node *seat_get_focus(struct sway_seat *seat) { | |||
1462 | return current->node; | 1462 | return current->node; |
1463 | } | 1463 | } |
1464 | 1464 | ||
1465 | struct wlr_surface *seat_get_focused_surface(struct sway_seat *seat) { | ||
1466 | struct sway_node *focus = seat_get_focus(seat); | ||
1467 | if (focus && node_is_view(focus)) { | ||
1468 | return focus->sway_container->view->surface; | ||
1469 | } | ||
1470 | struct wlr_layer_surface_v1 *layer = seat->focused_layer; | ||
1471 | if (layer && layer->surface) | ||
1472 | return layer->surface; | ||
1473 | return NULL; | ||
1474 | } | ||
1475 | |||
1476 | struct sway_workspace *seat_get_focused_workspace(struct sway_seat *seat) { | 1465 | struct sway_workspace *seat_get_focused_workspace(struct sway_seat *seat) { |
1477 | struct sway_node *focus = seat_get_focus_inactive(seat, &root->node); | 1466 | struct sway_node *focus = seat_get_focus_inactive(seat, &root->node); |
1478 | if (!focus) { | 1467 | if (!focus) { |