mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-26 17:54:17 +00:00
primaryselection - disable/enable primary selection
* Just simply adds a config to disable/enable primary selection * Revives Palanix's Primary-Selection patch
This commit is contained in:
parent
7e367bbfd1
commit
cece11390f
@ -1,9 +0,0 @@
|
||||
### Description
|
||||
Disables primary selection.
|
||||
While primary selection is implemented client side, we can still disable it by not copying into the buffer.
|
||||
|
||||
### Download
|
||||
- [2023-07-09](https://github.com/djpohly/dwl/compare/main...PalanixYT:psel.patch)
|
||||
|
||||
### Authors
|
||||
- [Palanix](https://github.com/PalanixYT)
|
||||
50
primaryselection/primaryselection.patch
Normal file
50
primaryselection/primaryselection.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 4fc77fde2f6015564544e029f9905fc1678fcb59 Mon Sep 17 00:00:00 2001
|
||||
From: nullsystem <nullsystem.aongp@slmail.me>
|
||||
Date: Sat, 6 Apr 2024 14:19:44 +0100
|
||||
Subject: [PATCH] primaryselection - disable/enable primary selection
|
||||
|
||||
* Just simply adds a config to disable/enable primary selection
|
||||
---
|
||||
config.def.h | 1 +
|
||||
dwl.c | 6 ++++--
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 8847e58..057e1c3 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -66,6 +66,7 @@ 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;
|
||||
+static const int enable_primary_selection = 0;
|
||||
/* You can choose between:
|
||||
LIBINPUT_CONFIG_SCROLL_NO_SCROLL
|
||||
LIBINPUT_CONFIG_SCROLL_2FG
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index bf763df..7e8d8f2 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -2339,7 +2339,8 @@ setup(void)
|
||||
wlr_export_dmabuf_manager_v1_create(dpy);
|
||||
wlr_screencopy_manager_v1_create(dpy);
|
||||
wlr_data_control_manager_v1_create(dpy);
|
||||
- wlr_primary_selection_v1_device_manager_create(dpy);
|
||||
+ if (enable_primary_selection)
|
||||
+ wlr_primary_selection_v1_device_manager_create(dpy);
|
||||
wlr_viewporter_create(dpy);
|
||||
wlr_single_pixel_buffer_manager_v1_create(dpy);
|
||||
wlr_fractional_scale_manager_v1_create(dpy, 1);
|
||||
@@ -2449,7 +2450,8 @@ setup(void)
|
||||
seat = wlr_seat_create(dpy, "seat0");
|
||||
LISTEN_STATIC(&seat->events.request_set_cursor, setcursor);
|
||||
LISTEN_STATIC(&seat->events.request_set_selection, setsel);
|
||||
- LISTEN_STATIC(&seat->events.request_set_primary_selection, setpsel);
|
||||
+ if (enable_primary_selection)
|
||||
+ LISTEN_STATIC(&seat->events.request_set_primary_selection, setpsel);
|
||||
LISTEN_STATIC(&seat->events.request_start_drag, requeststartdrag);
|
||||
LISTEN_STATIC(&seat->events.start_drag, startdrag);
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user