Cleanup previous PR

This commit is contained in:
Kovid Goyal 2026-01-15 19:26:27 +05:30
parent 6436cda482
commit 0d0ee5474d
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 7 additions and 9 deletions

14
glfw/x11_init.c vendored
View file

@ -178,21 +178,18 @@ read_xi_scroll_devices(void) {
bool is_finger_based = false;
// Method 1: Check for libinput tapping support (touchpads only)
Atom tapping_atom = XInternAtom(_glfw.x11.display, "libinput Tapping Enabled", False);
if (tapping_atom != None) {
if (_glfw.x11.xi.LIBINPUT_TAPPING != None) {
Atom tapping_type;
int tapping_format;
unsigned long tapping_nitems, tapping_bytes;
unsigned char *tapping_data = NULL;
if (XIGetProperty(_glfw.x11.display, device->deviceid,
tapping_atom, 0, 1, False, AnyPropertyType,
if (XIGetProperty(_glfw.x11.display, device->deviceid,
_glfw.x11.xi.LIBINPUT_TAPPING, 0, 1, False, AnyPropertyType,
&tapping_type, &tapping_format, &tapping_nitems,
&tapping_bytes, &tapping_data) == Success) {
if (tapping_data) {
if (tapping_nitems > 0) {
is_finger_based = true;
}
if (tapping_nitems > 0) is_finger_based = true;
XFree(tapping_data);
}
}
@ -545,6 +542,7 @@ static bool initExtensions(void)
XInternAtom(_glfw.x11.display, "_MOTIF_WM_HINTS", False);
_glfw.x11.xi.LIBINPUT_SCROLL_METHOD_ENABLED = XInternAtom(_glfw.x11.display, "libinput Scroll Method Enabled", False);
_glfw.x11.xi.LIBINPUT_TAPPING = XInternAtom(_glfw.x11.display, "libinput Tapping Enabled", False);
read_xi_scroll_devices();
// Select XI_HierarchyChanged events to detect device add/remove

2
glfw/x11_platform.h vendored
View file

@ -427,7 +427,7 @@ typedef struct _GLFWlibraryX11
XIScrollDevice scroll_devices[16];
unsigned num_scroll_devices;
int master_pointer_id;
Atom LIBINPUT_SCROLL_METHOD_ENABLED;
Atom LIBINPUT_SCROLL_METHOD_ENABLED, LIBINPUT_TAPPING;
} xi;
struct {