aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 08:49:38 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 08:49:38 -0400
commit0828c772514a85080c53ecade0b8b400314d5b03 (patch)
tree4e7fcb26ea1ebda57128eeb0ba4f9c79c7afbdb4 /sway/input/input-manager.c
parentrename seat functions (diff)
downloadsway-0828c772514a85080c53ecade0b8b400314d5b03.tar.gz
sway-0828c772514a85080c53ecade0b8b400314d5b03.tar.zst
sway-0828c772514a85080c53ecade0b8b400314d5b03.zip
rename input-manager functions
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 66ade685..4f3c3ee5 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -26,7 +26,7 @@ struct seat_config *current_seat_config = NULL;
26struct sway_seat *input_manager_current_seat(struct sway_input_manager *input) { 26struct sway_seat *input_manager_current_seat(struct sway_input_manager *input) {
27 struct sway_seat *seat = config->handler_context.seat; 27 struct sway_seat *seat = config->handler_context.seat;
28 if (!seat) { 28 if (!seat) {
29 seat = sway_input_manager_get_default_seat(input_manager); 29 seat = input_manager_get_default_seat(input_manager);
30 } 30 }
31 return seat; 31 return seat;
32} 32}
@@ -91,7 +91,7 @@ static bool input_has_seat_configuration(struct sway_input_manager *input) {
91 return false; 91 return false;
92} 92}
93 93
94static void sway_input_manager_libinput_config_pointer(struct sway_input_device *input_device) { 94static void input_manager_libinput_config_pointer(struct sway_input_device *input_device) {
95 struct wlr_input_device *wlr_device = input_device->wlr_device; 95 struct wlr_input_device *wlr_device = input_device->wlr_device;
96 struct input_config *ic = input_device->config; 96 struct input_config *ic = input_device->config;
97 struct libinput_device *libinput_device; 97 struct libinput_device *libinput_device;
@@ -101,7 +101,7 @@ static void sway_input_manager_libinput_config_pointer(struct sway_input_device
101 } 101 }
102 102
103 libinput_device = wlr_libinput_get_device_handle(wlr_device); 103 libinput_device = wlr_libinput_get_device_handle(wlr_device);
104 wlr_log(L_DEBUG, "sway_input_manager_libinput_config_pointer(%s)", ic->identifier); 104 wlr_log(L_DEBUG, "input_manager_libinput_config_pointer(%s)", ic->identifier);
105 105
106 if (ic->accel_profile != INT_MIN) { 106 if (ic->accel_profile != INT_MIN) {
107 wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)", 107 wlr_log(L_DEBUG, "libinput_config_pointer(%s) accel_set_profile(%d)",
@@ -214,7 +214,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) {
214 } 214 }
215 215
216 if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) { 216 if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) {
217 sway_input_manager_libinput_config_pointer(input_device); 217 input_manager_libinput_config_pointer(input_device);
218 } 218 }
219 219
220 struct sway_seat *seat = NULL; 220 struct sway_seat *seat = NULL;
@@ -256,7 +256,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) {
256 input_device->device_destroy.notify = handle_device_destroy; 256 input_device->device_destroy.notify = handle_device_destroy;
257} 257}
258 258
259struct sway_input_manager *sway_input_manager_create( 259struct sway_input_manager *input_manager_create(
260 struct sway_server *server) { 260 struct sway_server *server) {
261 struct sway_input_manager *input = 261 struct sway_input_manager *input =
262 calloc(1, sizeof(struct sway_input_manager)); 262 calloc(1, sizeof(struct sway_input_manager));
@@ -277,7 +277,7 @@ struct sway_input_manager *sway_input_manager_create(
277 return input; 277 return input;
278} 278}
279 279
280bool sway_input_manager_has_focus(struct sway_input_manager *input, 280bool input_manager_has_focus(struct sway_input_manager *input,
281 struct sway_container *container) { 281 struct sway_container *container) {
282 struct sway_seat *seat = NULL; 282 struct sway_seat *seat = NULL;
283 wl_list_for_each(seat, &input->seats, link) { 283 wl_list_for_each(seat, &input->seats, link) {
@@ -289,7 +289,7 @@ bool sway_input_manager_has_focus(struct sway_input_manager *input,
289 return false; 289 return false;
290} 290}
291 291
292void sway_input_manager_set_focus(struct sway_input_manager *input, 292void input_manager_set_focus(struct sway_input_manager *input,
293 struct sway_container *container) { 293 struct sway_container *container) {
294 struct sway_seat *seat ; 294 struct sway_seat *seat ;
295 wl_list_for_each(seat, &input->seats, link) { 295 wl_list_for_each(seat, &input->seats, link) {
@@ -297,7 +297,7 @@ void sway_input_manager_set_focus(struct sway_input_manager *input,
297 } 297 }
298} 298}
299 299
300void sway_input_manager_apply_input_config(struct sway_input_manager *input, 300void input_manager_apply_input_config(struct sway_input_manager *input,
301 struct input_config *input_config) { 301 struct input_config *input_config) {
302 struct sway_input_device *input_device = NULL; 302 struct sway_input_device *input_device = NULL;
303 wl_list_for_each(input_device, &input->devices, link) { 303 wl_list_for_each(input_device, &input->devices, link) {
@@ -306,7 +306,7 @@ void sway_input_manager_apply_input_config(struct sway_input_manager *input,
306 input_device->config = copy_input_config(input_config); 306 input_device->config = copy_input_config(input_config);
307 307
308 if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) { 308 if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) {
309 sway_input_manager_libinput_config_pointer(input_device); 309 input_manager_libinput_config_pointer(input_device);
310 } 310 }
311 311
312 struct sway_seat *seat = NULL; 312 struct sway_seat *seat = NULL;
@@ -317,7 +317,7 @@ void sway_input_manager_apply_input_config(struct sway_input_manager *input,
317 } 317 }
318} 318}
319 319
320void sway_input_manager_apply_seat_config(struct sway_input_manager *input, 320void input_manager_apply_seat_config(struct sway_input_manager *input,
321 struct seat_config *seat_config) { 321 struct seat_config *seat_config) {
322 wlr_log(L_DEBUG, "applying new seat config for seat %s", 322 wlr_log(L_DEBUG, "applying new seat config for seat %s",
323 seat_config->name); 323 seat_config->name);
@@ -373,14 +373,14 @@ void sway_input_manager_apply_seat_config(struct sway_input_manager *input,
373 } 373 }
374} 374}
375 375
376void sway_input_manager_configure_xcursor(struct sway_input_manager *input) { 376void input_manager_configure_xcursor(struct sway_input_manager *input) {
377 struct sway_seat *seat = NULL; 377 struct sway_seat *seat = NULL;
378 wl_list_for_each(seat, &input->seats, link) { 378 wl_list_for_each(seat, &input->seats, link) {
379 seat_configure_xcursor(seat); 379 seat_configure_xcursor(seat);
380 } 380 }
381} 381}
382 382
383struct sway_seat *sway_input_manager_get_default_seat( 383struct sway_seat *input_manager_get_default_seat(
384 struct sway_input_manager *input) { 384 struct sway_input_manager *input) {
385 struct sway_seat *seat = NULL; 385 struct sway_seat *seat = NULL;
386 wl_list_for_each(seat, &input->seats, link) { 386 wl_list_for_each(seat, &input->seats, link) {