summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 12:16:00 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 12:16:00 -0400
commit35445b40a273ca1548915e1f17097a45aebbd44c (patch)
tree34ea2de2accaa52945318c20dcba50ea1cdd3258
parent80col (diff)
downloadsway-35445b40a273ca1548915e1f17097a45aebbd44c.tar.gz
sway-35445b40a273ca1548915e1f17097a45aebbd44c.tar.zst
sway-35445b40a273ca1548915e1f17097a45aebbd44c.zip
remove unused attachment config
-rw-r--r--include/sway/config.h27
-rw-r--r--include/sway/input/seat.h1
-rw-r--r--sway/input/seat.c10
3 files changed, 26 insertions, 12 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 03b51948..91f772b5 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -377,6 +377,7 @@ void free_config(struct sway_config *config);
377void config_clear_handler_context(struct sway_config *config); 377void config_clear_handler_context(struct sway_config *config);
378 378
379void free_sway_variable(struct sway_variable *var); 379void free_sway_variable(struct sway_variable *var);
380
380/** 381/**
381 * Does variable replacement for a string based on the config's currently loaded variables. 382 * Does variable replacement for a string based on the config's currently loaded variables.
382 */ 383 */
@@ -385,44 +386,68 @@ char *do_var_replacement(char *str);
385struct cmd_results *check_security_config(); 386struct cmd_results *check_security_config();
386 387
387int input_identifier_cmp(const void *item, const void *data); 388int input_identifier_cmp(const void *item, const void *data);
389
388struct input_config *new_input_config(const char* identifier); 390struct input_config *new_input_config(const char* identifier);
391
389void merge_input_config(struct input_config *dst, struct input_config *src); 392void merge_input_config(struct input_config *dst, struct input_config *src);
393
390struct input_config *copy_input_config(struct input_config *ic); 394struct input_config *copy_input_config(struct input_config *ic);
395
391void free_input_config(struct input_config *ic); 396void free_input_config(struct input_config *ic);
397
392void apply_input_config(struct input_config *input); 398void apply_input_config(struct input_config *input);
393 399
394int seat_name_cmp(const void *item, const void *data); 400int seat_name_cmp(const void *item, const void *data);
401
395struct seat_config *new_seat_config(const char* name); 402struct seat_config *new_seat_config(const char* name);
403
396void merge_seat_config(struct seat_config *dst, struct seat_config *src); 404void merge_seat_config(struct seat_config *dst, struct seat_config *src);
405
397struct seat_config *copy_seat_config(struct seat_config *seat); 406struct seat_config *copy_seat_config(struct seat_config *seat);
407
398void free_seat_config(struct seat_config *ic); 408void free_seat_config(struct seat_config *ic);
409
399struct seat_attachment_config *seat_attachment_config_new(); 410struct seat_attachment_config *seat_attachment_config_new();
411
400struct seat_attachment_config *seat_config_get_attachment( 412struct seat_attachment_config *seat_config_get_attachment(
401 struct seat_config *seat_config, char *identifier); 413 struct seat_config *seat_config, char *identifier);
414
402void apply_seat_config(struct seat_config *seat); 415void apply_seat_config(struct seat_config *seat);
403 416
404int output_name_cmp(const void *item, const void *data); 417int output_name_cmp(const void *item, const void *data);
418
405void output_get_identifier(char *identifier, size_t len, 419void output_get_identifier(char *identifier, size_t len,
406 struct sway_output *output); 420 struct sway_output *output);
421
407struct output_config *new_output_config(const char *name); 422struct output_config *new_output_config(const char *name);
423
408void merge_output_config(struct output_config *dst, struct output_config *src); 424void merge_output_config(struct output_config *dst, struct output_config *src);
425
409void apply_output_config(struct output_config *oc, 426void apply_output_config(struct output_config *oc,
410 struct sway_container *output); 427 struct sway_container *output);
428
411void free_output_config(struct output_config *oc); 429void free_output_config(struct output_config *oc);
412 430
413int workspace_output_cmp_workspace(const void *a, const void *b); 431int workspace_output_cmp_workspace(const void *a, const void *b);
414 432
415int sway_binding_cmp(const void *a, const void *b); 433int sway_binding_cmp(const void *a, const void *b);
434
416int sway_binding_cmp_qsort(const void *a, const void *b); 435int sway_binding_cmp_qsort(const void *a, const void *b);
436
417int sway_binding_cmp_keys(const void *a, const void *b); 437int sway_binding_cmp_keys(const void *a, const void *b);
438
418void free_sway_binding(struct sway_binding *sb); 439void free_sway_binding(struct sway_binding *sb);
440
419struct sway_binding *sway_binding_dup(struct sway_binding *sb); 441struct sway_binding *sway_binding_dup(struct sway_binding *sb);
420 442
421/* Bar stuff */
422void load_swaybars(); 443void load_swaybars();
444
423void invoke_swaybar(struct bar_config *bar); 445void invoke_swaybar(struct bar_config *bar);
446
424void terminate_swaybg(pid_t pid); 447void terminate_swaybg(pid_t pid);
448
425struct bar_config *default_bar_config(void); 449struct bar_config *default_bar_config(void);
450
426void free_bar_config(struct bar_config *bar); 451void free_bar_config(struct bar_config *bar);
427 452
428/* Global config singleton. */ 453/* Global config singleton. */
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 3a1cf350..5c3c2c4f 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -8,7 +8,6 @@ struct sway_seat_device {
8 struct sway_seat *sway_seat; 8 struct sway_seat *sway_seat;
9 struct sway_input_device *input_device; 9 struct sway_input_device *input_device;
10 struct sway_keyboard *keyboard; 10 struct sway_keyboard *keyboard;
11 struct seat_attachment_config *attachment_config;
12 struct wl_list link; // sway_seat::devices 11 struct wl_list link; // sway_seat::devices
13}; 12};
14 13
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 38b617b7..27636c1e 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -202,13 +202,6 @@ void seat_configure_device(struct sway_seat *seat,
202 return; 202 return;
203 } 203 }
204 204
205 struct seat_config *seat_config = seat_get_config(seat);
206
207 if (seat_config) {
208 seat_device->attachment_config =
209 seat_config_get_attachment(seat_config, input_device->identifier);
210 }
211
212 switch (input_device->wlr_device->type) { 205 switch (input_device->wlr_device->type) {
213 case WLR_INPUT_DEVICE_POINTER: 206 case WLR_INPUT_DEVICE_POINTER:
214 seat_configure_pointer(seat, seat_device); 207 seat_configure_pointer(seat, seat_device);
@@ -426,9 +419,6 @@ struct sway_container *seat_get_focus_by_type(struct sway_seat *seat,
426void seat_apply_config(struct sway_seat *seat, 419void seat_apply_config(struct sway_seat *seat,
427 struct seat_config *seat_config) { 420 struct seat_config *seat_config) {
428 struct sway_seat_device *seat_device = NULL; 421 struct sway_seat_device *seat_device = NULL;
429 wl_list_for_each(seat_device, &seat->devices, link) {
430 seat_device->attachment_config = NULL;
431 }
432 422
433 if (!seat_config) { 423 if (!seat_config) {
434 return; 424 return;