diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-02-04 13:39:10 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-02-04 14:08:54 -0500 |
commit | 515150229847c9ebdfd0cabb6f0026fca9d57a23 (patch) | |
tree | 8a50ce0ac8ce4dc2ec973c63c68dc45378c50737 /include/sway/input/seat.h | |
parent | Implement workspaces (diff) | |
download | sway-515150229847c9ebdfd0cabb6f0026fca9d57a23.tar.gz sway-515150229847c9ebdfd0cabb6f0026fca9d57a23.tar.zst sway-515150229847c9ebdfd0cabb6f0026fca9d57a23.zip |
basic focus overhaul
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r-- | include/sway/input/seat.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index b21cbccb..8d5d6b75 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h | |||
@@ -12,14 +12,26 @@ struct sway_seat_device { | |||
12 | struct wl_list link; // sway_seat::devices | 12 | struct wl_list link; // sway_seat::devices |
13 | }; | 13 | }; |
14 | 14 | ||
15 | struct sway_seat_container { | ||
16 | struct sway_seat *seat; | ||
17 | swayc_t *container; | ||
18 | |||
19 | struct wl_list link; // sway_seat::focus_stack | ||
20 | |||
21 | struct wl_listener destroy; | ||
22 | }; | ||
23 | |||
15 | struct sway_seat { | 24 | struct sway_seat { |
16 | struct wlr_seat *wlr_seat; | 25 | struct wlr_seat *wlr_seat; |
17 | struct seat_config *config; | 26 | struct seat_config *config; |
18 | struct sway_cursor *cursor; | 27 | struct sway_cursor *cursor; |
19 | struct sway_input_manager *input; | 28 | struct sway_input_manager *input; |
20 | swayc_t *focus; | 29 | |
30 | bool has_focus; | ||
31 | struct wl_list focus_stack; // list of containers in focus order | ||
21 | 32 | ||
22 | struct wl_listener focus_destroy; | 33 | struct wl_listener focus_destroy; |
34 | struct wl_listener new_container; | ||
23 | 35 | ||
24 | struct wl_list devices; // sway_seat_device::link | 36 | struct wl_list devices; // sway_seat_device::link |
25 | 37 | ||
@@ -44,6 +56,8 @@ void sway_seat_configure_xcursor(struct sway_seat *seat); | |||
44 | 56 | ||
45 | void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container); | 57 | void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container); |
46 | 58 | ||
59 | swayc_t *sway_seat_get_focus(struct sway_seat *seat, swayc_t *container); | ||
60 | |||
47 | void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config); | 61 | void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config); |
48 | 62 | ||
49 | #endif | 63 | #endif |