From ac6f9f5e7711521455b83ceb843a25e091646d43 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 17:08:48 +0300 Subject: Report the system double-click interval wsap_term hardcodes 400 ms in three places to count clicks. yasl_display_double_click_ms() reads the interval from the system. X11 parses Net/DoubleClickTime from the XSETTINGS owner's property. Wayland has no protocol for it, so it asks the Settings portal for KDE's DoubleClickInterval, which KDE sends as a string and which exists only when the user set it, then GNOME's double-click. X11 without XSETTINGS asks the portal too. Cocoa reads NSEvent.doubleClickInterval. Missing or implausible values give YASL_DOUBLE_CLICK_MS_DEFAULT, 400 ms. The X11 state test covers the XSETTINGS parser in both byte orders and with truncation. The Xwayland test owns the settings selection. The desktop test serves both portal keys. The Cocoa path is not built or run here. Co-Authored-By: Claude Opus 5.5 --- docs/guide.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/guide.md b/docs/guide.md index 7f02ab7..2926011 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -222,7 +222,11 @@ with `device` distinguishing mouse, touch, pen, and eraser. `POINTER_DOWN` and or touch contact. Other types leave `button` meaningless. Every pointer event also carries `buttons`, a `YASL_BUTTON_BIT()` mask of the buttons held after that event, tracked from the queue's down and up events. Use it to tell a drag -from a hover. `YASL_EVENT_INPUT_RESET` clears the mask. On Wayland, +from a hover. Count clicks against `yasl_display_double_click_ms()`, the +system interval: XSETTINGS on X11, the KDE or GNOME setting through the +Settings portal on Wayland, and the system value on Cocoa. It falls back to +`YASL_DOUBLE_CLICK_MS_DEFAULT` (400 ms). The query can wait briefly on Linux, so +read it when a window gains focus. `YASL_EVENT_INPUT_RESET` clears the mask. On Wayland, `POINTER_LEAVE` also clears it, because the compositor sends leave during a press only when it takes the pointer away. X11 and Cocoa keep the press across leave and still deliver the release. `POINTER_MOTION` reports `delta`, the device-pixel movement since -- cgit v1.2.3