diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-02-14 14:30:27 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-02-14 14:30:27 -0500 |
commit | 946d9459c57fc38b2536d40a45b7d4c9186b6734 (patch) | |
tree | 0fe98d3382dccb56a09f90ddeb5938d880234d1c /sway/input/seat.c | |
parent | remove old focus member (diff) | |
download | sway-946d9459c57fc38b2536d40a45b7d4c9186b6734.tar.gz sway-946d9459c57fc38b2536d40a45b7d4c9186b6734.tar.zst sway-946d9459c57fc38b2536d40a45b7d4c9186b6734.zip |
get swayc in direction
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 2abe8a1f..648e7914 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -358,6 +358,16 @@ swayc_t *sway_seat_get_focus(struct sway_seat *seat) { | |||
358 | return sway_seat_get_focus_inactive(seat, &root_container); | 358 | return sway_seat_get_focus_inactive(seat, &root_container); |
359 | } | 359 | } |
360 | 360 | ||
361 | swayc_t *sway_seat_get_focus_by_type(struct sway_seat *seat, | ||
362 | enum swayc_types type) { | ||
363 | swayc_t *focus = sway_seat_get_focus_inactive(seat, &root_container); | ||
364 | if (focus->type == type) { | ||
365 | return focus; | ||
366 | } | ||
367 | |||
368 | return swayc_parent_by_type(focus, type); | ||
369 | } | ||
370 | |||
361 | void sway_seat_set_config(struct sway_seat *seat, | 371 | void sway_seat_set_config(struct sway_seat *seat, |
362 | struct seat_config *seat_config) { | 372 | struct seat_config *seat_config) { |
363 | // clear configs | 373 | // clear configs |