From ecbc2c61db180dc8ab1053b7cdc1e4817be33d36 Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Sun, 27 Mar 2022 17:04:41 -0700 Subject: Add configuration options for touchpads --- config.def.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 190b0da..4f131dd 100644 --- a/config.def.h +++ b/config.def.h @@ -49,7 +49,31 @@ static const int repeat_delay = 600; /* Trackpad */ static const int tap_to_click = 1; +static const int tap_and_drag = 1; +static const int drag_lock = 1; static const int natural_scrolling = 0; +static const int disable_while_typing = 1; +static const int left_handed = 0; +static const int middle_button_emulation = 0; +/* You can choose between: +LIBINPUT_CONFIG_SCROLL_NO_SCROLL +LIBINPUT_CONFIG_SCROLL_2FG +LIBINPUT_CONFIG_SCROLL_EDGE +LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN +*/ +static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG; +/* You can choose between: +LIBINPUT_CONFIG_SEND_EVENTS_ENABLED +LIBINPUT_CONFIG_SEND_EVENTS_DISABLED +LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE +*/ +static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED; +/* You can choose between: +LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT +LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE +*/ +static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE; +static const double accel_speed = 0.0; /* If you want to use the windows key change this to WLR_MODIFIER_LOGO */ #define MODKEY WLR_MODIFIER_ALT -- cgit v1.2.3 From 70da04a714914990556b8f123895301a57ee6d3f Mon Sep 17 00:00:00 2001 From: Lennart Jablonka Date: Fri, 3 Jun 2022 01:15:06 +0200 Subject: initialize xkb_rules.options to a null pointer Initializing it to an empty string had broken configuring xkbcommon through the environment (XKB_DEFAULT_OPTIONS). Fixes: ae313911153b ("initialize rules and xkb_rules") --- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 4f131dd..8c27380 100644 --- a/config.def.h +++ b/config.def.h @@ -41,7 +41,7 @@ static const struct xkb_rule_names xkb_rules = { /* example: .options = "ctrl:nocaps", */ - .options = "", + .options = NULL, }; static const int repeat_rate = 25; -- cgit v1.2.3 From 8bce3b1583977dee0c8a1815c558cae3b9346f67 Mon Sep 17 00:00:00 2001 From: Marco Siedentopf Date: Fri, 10 Jun 2022 01:30:22 +0000 Subject: add click method configuration option Add the libinput configuration option to choose between Software Button Areas and Clickfinger --- config.def.h | 7 +++++++ dwl.c | 3 +++ 2 files changed, 10 insertions(+) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 4f131dd..fabadb3 100644 --- a/config.def.h +++ b/config.def.h @@ -63,10 +63,17 @@ LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN */ static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG; /* You can choose between: +LIBINPUT_CONFIG_CLICK_METHOD_NONE +LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS +LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER +*/ +static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS; +/* You can choose between: LIBINPUT_CONFIG_SEND_EVENTS_ENABLED LIBINPUT_CONFIG_SEND_EVENTS_DISABLED LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE */ + static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED; /* You can choose between: LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT diff --git a/dwl.c b/dwl.c index e4bed14..e0f7e99 100644 --- a/dwl.c +++ b/dwl.c @@ -1003,6 +1003,9 @@ createpointer(struct wlr_input_device *device) if (libinput_device_config_scroll_get_methods(libinput_device) != LIBINPUT_CONFIG_SCROLL_NO_SCROLL) libinput_device_config_scroll_set_method (libinput_device, scroll_method); + + if (libinput_device_config_click_get_methods(libinput_device) != LIBINPUT_CONFIG_CLICK_METHOD_NONE) + libinput_device_config_click_set_method (libinput_device, click_method); if (libinput_device_config_send_events_get_modes(libinput_device)) libinput_device_config_send_events_set_mode(libinput_device, send_events_mode); -- cgit v1.2.3 From 583f471cfe61f9f92d238ad2d2d9a9db29e40aa5 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Fri, 10 Jun 2022 12:32:22 -0500 Subject: add some blank lines --- config.def.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index fabadb3..a98ec36 100644 --- a/config.def.h +++ b/config.def.h @@ -62,19 +62,21 @@ LIBINPUT_CONFIG_SCROLL_EDGE LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN */ static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG; + /* You can choose between: LIBINPUT_CONFIG_CLICK_METHOD_NONE LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER */ static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS; + /* You can choose between: LIBINPUT_CONFIG_SEND_EVENTS_ENABLED LIBINPUT_CONFIG_SEND_EVENTS_DISABLED LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE */ - static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED; + /* You can choose between: LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE -- cgit v1.2.3 From 8cdb9971264adfdc35777b5a9935c2e4c47eea9f Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Sat, 23 Jul 2022 02:08:10 -0500 Subject: conform the xdg-protocol with fullscreen translucent clients see `setfullscreen()` for more info --- config.def.h | 2 ++ dwl.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 43f35cd..29c6dbf 100644 --- a/config.def.h +++ b/config.def.h @@ -5,6 +5,8 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscree static const float rootcolor[] = {0.3, 0.3, 0.3, 1.0}; static const float bordercolor[] = {0.5, 0.5, 0.5, 1.0}; static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0}; +/* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */ +static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; diff --git a/dwl.c b/dwl.c index 727e6e1..35c72f0 100644 --- a/dwl.c +++ b/dwl.c @@ -98,6 +98,7 @@ typedef struct { struct wlr_scene_node *scene; struct wlr_scene_rect *border[4]; /* top, bottom, left, right */ struct wlr_scene_node *scene_surface; + struct wlr_scene_rect *fullscreen_bg; /* See setfullscreen() for info */ struct wl_list link; struct wl_list flink; union { @@ -1869,10 +1870,23 @@ setfullscreen(Client *c, int fullscreen) if (fullscreen) { c->prev = c->geom; resize(c, c->mon->m, 0); + /* The xdg-protocol specifies: + * + * If the fullscreened surface is not opaque, the compositor must make + * sure that other screen content not part of the same surface tree (made + * up of subsurfaces, popups or similarly coupled surfaces) are not + * visible below the fullscreened surface. + * + * For brevity we set a black background for all clients + */ + c->fullscreen_bg = wlr_scene_rect_create(c->scene, + c->geom.width, c->geom.height, fullscreen_bg); + wlr_scene_node_lower_to_bottom(&c->fullscreen_bg->node); } else { /* restore previous size instead of arrange for floating windows since * client positions are set by the user and cannot be recalculated */ resize(c, c->prev, 0); + wlr_scene_node_destroy(&c->fullscreen_bg->node); } arrange(c->mon); printstatus(); -- cgit v1.2.3