diff options
author | 2016-07-17 13:27:02 +0200 | |
---|---|---|
committer | 2016-07-18 20:12:49 +0200 | |
commit | 50b09937b2e591f4c256b0fb7e778131450eece3 (patch) | |
tree | 856000d3f64202a1c0247b4fae9fb0b615dc8236 /sway/config.c | |
parent | Move backgrounds to back after arrange_windows (diff) | |
download | sway-50b09937b2e591f4c256b0fb7e778131450eece3.tar.gz sway-50b09937b2e591f4c256b0fb7e778131450eece3.tar.zst sway-50b09937b2e591f4c256b0fb7e778131450eece3.zip |
clean up apply_input_config
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sway/config.c b/sway/config.c index 9c957e2d..5e1887a6 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -810,49 +810,49 @@ void load_swaybars() { | |||
810 | } | 810 | } |
811 | 811 | ||
812 | void apply_input_config(struct input_config *ic, struct libinput_device *dev) { | 812 | void apply_input_config(struct input_config *ic, struct libinput_device *dev) { |
813 | if (ic) { | 813 | if (!ic) { |
814 | sway_log(L_DEBUG, | 814 | return; |
815 | "apply_input_config(%s)", | ||
816 | ic->identifier); | ||
817 | } | 815 | } |
818 | 816 | ||
819 | if (ic && ic->accel_profile != INT_MIN) { | 817 | sway_log(L_DEBUG, "apply_input_config(%s)", ic->identifier); |
818 | |||
819 | if (ic->accel_profile != INT_MIN) { | ||
820 | sway_log(L_DEBUG, "apply_input_config(%s) accel_set_profile(%d)", ic->identifier, ic->accel_profile); | 820 | sway_log(L_DEBUG, "apply_input_config(%s) accel_set_profile(%d)", ic->identifier, ic->accel_profile); |
821 | libinput_device_config_accel_set_profile(dev, ic->accel_profile); | 821 | libinput_device_config_accel_set_profile(dev, ic->accel_profile); |
822 | } | 822 | } |
823 | if (ic && ic->click_method != INT_MIN) { | 823 | if (ic->click_method != INT_MIN) { |
824 | sway_log(L_DEBUG, "apply_input_config(%s) click_set_method(%d)", ic->identifier, ic->click_method); | 824 | sway_log(L_DEBUG, "apply_input_config(%s) click_set_method(%d)", ic->identifier, ic->click_method); |
825 | libinput_device_config_click_set_method(dev, ic->click_method); | 825 | libinput_device_config_click_set_method(dev, ic->click_method); |
826 | } | 826 | } |
827 | if (ic && ic->drag_lock != INT_MIN) { | 827 | if (ic->drag_lock != INT_MIN) { |
828 | sway_log(L_DEBUG, "apply_input_config(%s) tap_set_drag_lock_enabled(%d)", ic->identifier, ic->click_method); | 828 | sway_log(L_DEBUG, "apply_input_config(%s) tap_set_drag_lock_enabled(%d)", ic->identifier, ic->click_method); |
829 | libinput_device_config_tap_set_drag_lock_enabled(dev, ic->drag_lock); | 829 | libinput_device_config_tap_set_drag_lock_enabled(dev, ic->drag_lock); |
830 | } | 830 | } |
831 | if (ic && ic->dwt != INT_MIN) { | 831 | if (ic->dwt != INT_MIN) { |
832 | sway_log(L_DEBUG, "apply_input_config(%s) dwt_set_enabled(%d)", ic->identifier, ic->dwt); | 832 | sway_log(L_DEBUG, "apply_input_config(%s) dwt_set_enabled(%d)", ic->identifier, ic->dwt); |
833 | libinput_device_config_dwt_set_enabled(dev, ic->dwt); | 833 | libinput_device_config_dwt_set_enabled(dev, ic->dwt); |
834 | } | 834 | } |
835 | if (ic && ic->middle_emulation != INT_MIN) { | 835 | if (ic->middle_emulation != INT_MIN) { |
836 | sway_log(L_DEBUG, "apply_input_config(%s) middle_emulation_set_enabled(%d)", ic->identifier, ic->middle_emulation); | 836 | sway_log(L_DEBUG, "apply_input_config(%s) middle_emulation_set_enabled(%d)", ic->identifier, ic->middle_emulation); |
837 | libinput_device_config_middle_emulation_set_enabled(dev, ic->middle_emulation); | 837 | libinput_device_config_middle_emulation_set_enabled(dev, ic->middle_emulation); |
838 | } | 838 | } |
839 | if (ic && ic->natural_scroll != INT_MIN) { | 839 | if (ic->natural_scroll != INT_MIN) { |
840 | sway_log(L_DEBUG, "apply_input_config(%s) natural_scroll_set_enabled(%d)", ic->identifier, ic->natural_scroll); | 840 | sway_log(L_DEBUG, "apply_input_config(%s) natural_scroll_set_enabled(%d)", ic->identifier, ic->natural_scroll); |
841 | libinput_device_config_scroll_set_natural_scroll_enabled(dev, ic->natural_scroll); | 841 | libinput_device_config_scroll_set_natural_scroll_enabled(dev, ic->natural_scroll); |
842 | } | 842 | } |
843 | if (ic && ic->pointer_accel != FLT_MIN) { | 843 | if (ic->pointer_accel != FLT_MIN) { |
844 | sway_log(L_DEBUG, "apply_input_config(%s) accel_set_speed(%f)", ic->identifier, ic->pointer_accel); | 844 | sway_log(L_DEBUG, "apply_input_config(%s) accel_set_speed(%f)", ic->identifier, ic->pointer_accel); |
845 | libinput_device_config_accel_set_speed(dev, ic->pointer_accel); | 845 | libinput_device_config_accel_set_speed(dev, ic->pointer_accel); |
846 | } | 846 | } |
847 | if (ic && ic->scroll_method != INT_MIN) { | 847 | if (ic->scroll_method != INT_MIN) { |
848 | sway_log(L_DEBUG, "apply_input_config(%s) scroll_set_method(%d)", ic->identifier, ic->scroll_method); | 848 | sway_log(L_DEBUG, "apply_input_config(%s) scroll_set_method(%d)", ic->identifier, ic->scroll_method); |
849 | libinput_device_config_scroll_set_method(dev, ic->scroll_method); | 849 | libinput_device_config_scroll_set_method(dev, ic->scroll_method); |
850 | } | 850 | } |
851 | if (ic && ic->send_events != INT_MIN) { | 851 | if (ic->send_events != INT_MIN) { |
852 | sway_log(L_DEBUG, "apply_input_config(%s) send_events_set_mode(%d)", ic->identifier, ic->send_events); | 852 | sway_log(L_DEBUG, "apply_input_config(%s) send_events_set_mode(%d)", ic->identifier, ic->send_events); |
853 | libinput_device_config_send_events_set_mode(dev, ic->send_events); | 853 | libinput_device_config_send_events_set_mode(dev, ic->send_events); |
854 | } | 854 | } |
855 | if (ic && ic->tap != INT_MIN) { | 855 | if (ic->tap != INT_MIN) { |
856 | sway_log(L_DEBUG, "apply_input_config(%s) tap_set_enabled(%d)", ic->identifier, ic->tap); | 856 | sway_log(L_DEBUG, "apply_input_config(%s) tap_set_enabled(%d)", ic->identifier, ic->tap); |
857 | libinput_device_config_tap_set_enabled(dev, ic->tap); | 857 | libinput_device_config_tap_set_enabled(dev, ic->tap); |
858 | } | 858 | } |