aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-18 21:20:00 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-20 13:11:43 +1000
commitc006717910e5f30ca65645f701541dfa176c1392 (patch)
treec64452b7f2fe6ab481ad90c424cb14bcb0328eda /include/sway/input/seat.h
parentMerge pull request #2872 from RyanDwyer/cursor-rebase (diff)
downloadsway-c006717910e5f30ca65645f701541dfa176c1392.tar.gz
sway-c006717910e5f30ca65645f701541dfa176c1392.tar.zst
sway-c006717910e5f30ca65645f701541dfa176c1392.zip
Minor refactor of input manager
The input manager is a singleton object. Passing the sway_input_manager argument to each of its functions is unnecessary, while removing the argument makes it obvious to the caller that it's a singleton. This patch removes the argument and makes the input manager use server.input instead. On a similar note: * sway_input_manager.server is removed in favour of using the server global. * seat.input is removed because it can get it from server.input. Due to a circular dependency, creating seat0 is now done directly in server_init rather than in input_manager_create. This is because creating seats must be done after server.input is set. Lastly, it now stores the default seat name using a constant and removes a second reference to seat0 (in input_manager_get_default_seat).
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r--include/sway/input/seat.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index e9f553f3..ef65810c 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -47,7 +47,6 @@ enum sway_seat_operation {
47struct sway_seat { 47struct sway_seat {
48 struct wlr_seat *wlr_seat; 48 struct wlr_seat *wlr_seat;
49 struct sway_cursor *cursor; 49 struct sway_cursor *cursor;
50 struct sway_input_manager *input;
51 50
52 bool has_focus; 51 bool has_focus;
53 struct wl_list focus_stack; // list of containers in focus order 52 struct wl_list focus_stack; // list of containers in focus order
@@ -89,8 +88,7 @@ struct sway_seat {
89 struct wl_list link; // input_manager::seats 88 struct wl_list link; // input_manager::seats
90}; 89};
91 90
92struct sway_seat *seat_create(struct sway_input_manager *input, 91struct sway_seat *seat_create(const char *seat_name);
93 const char *seat_name);
94 92
95void seat_destroy(struct sway_seat *seat); 93void seat_destroy(struct sway_seat *seat);
96 94