aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-10-20 08:42:56 +0200
committerGitHub <noreply@github.com>2018-10-20 08:42:56 +0200
commit75ea19c71b08e4b3dd1ad053944724fd91dc04bd (patch)
tree734b3ad6e6ef44d62ac6bbb1162a8bbb2ca28ae4 /include
parentfe6aea1d02db7e172cafdaac61d612d0de2dc9d0 (diff)
parentc006717910e5f30ca65645f701541dfa176c1392 (diff)
Merge pull request #2870 from RyanDwyer/refactor-input-manager
Minor refactor of input manager
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/input-manager.h29
-rw-r--r--include/sway/input/seat.h4
2 files changed, 9 insertions, 24 deletions
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
index b7073006..219aa9ba 100644
--- a/include/sway/input/input-manager.h
+++ b/include/sway/input/input-manager.h
@@ -7,12 +7,6 @@
#include "sway/config.h"
#include "list.h"
-/**
- * The global singleton input manager
- * TODO: make me not a global
- */
-extern struct sway_input_manager *input_manager;
-
struct sway_input_device {
char *identifier;
struct wlr_input_device *wlr_device;
@@ -21,7 +15,6 @@ struct sway_input_device {
};
struct sway_input_manager {
- struct sway_server *server;
struct wl_list devices;
struct wl_list seats;
@@ -36,30 +29,24 @@ struct sway_input_manager {
struct sway_input_manager *input_manager_create(struct sway_server *server);
-bool input_manager_has_focus(struct sway_input_manager *input,
- struct sway_node *node);
+bool input_manager_has_focus(struct sway_node *node);
-void input_manager_set_focus(struct sway_input_manager *input,
- struct sway_node *node);
+void input_manager_set_focus(struct sway_node *node);
-void input_manager_configure_xcursor(struct sway_input_manager *input);
+void input_manager_configure_xcursor(void);
-void input_manager_apply_input_config(struct sway_input_manager *input,
- struct input_config *input_config);
+void input_manager_apply_input_config(struct input_config *input_config);
-void input_manager_apply_seat_config(struct sway_input_manager *input,
- struct seat_config *seat_config);
+void input_manager_apply_seat_config(struct seat_config *seat_config);
-struct sway_seat *input_manager_get_default_seat(
- struct sway_input_manager *input);
+struct sway_seat *input_manager_get_default_seat(void);
-struct sway_seat *input_manager_get_seat(struct sway_input_manager *input,
- const char *seat_name);
+struct sway_seat *input_manager_get_seat(const char *seat_name);
/**
* Gets the last seat the user interacted with
*/
-struct sway_seat *input_manager_current_seat(struct sway_input_manager *input);
+struct sway_seat *input_manager_current_seat(void);
struct input_config *input_device_get_config(struct sway_input_device *device);
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 {
struct sway_seat {
struct wlr_seat *wlr_seat;
struct sway_cursor *cursor;
- struct sway_input_manager *input;
bool has_focus;
struct wl_list focus_stack; // list of containers in focus order
@@ -89,8 +88,7 @@ struct sway_seat {
struct wl_list link; // input_manager::seats
};
-struct sway_seat *seat_create(struct sway_input_manager *input,
- const char *seat_name);
+struct sway_seat *seat_create(const char *seat_name);
void seat_destroy(struct sway_seat *seat);