summaryrefslogtreecommitdiff
path: root/src/platform/freedesktop/dbus.h
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 17:08:48 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 17:08:48 +0300
commitac6f9f5e7711521455b83ceb843a25e091646d43 (patch)
tree0dfd5fc46a605cd4980ef3c9131ddbaa2270c78a /src/platform/freedesktop/dbus.h
parentd4d13e616cb15ef22479d9cb97922af93317a01a (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'src/platform/freedesktop/dbus.h')
-rw-r--r--src/platform/freedesktop/dbus.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/platform/freedesktop/dbus.h b/src/platform/freedesktop/dbus.h
index 3b1662b..fd0aeb1 100644
--- a/src/platform/freedesktop/dbus.h
+++ b/src/platform/freedesktop/dbus.h
@@ -10,7 +10,10 @@
/* Send org.freedesktop.Notifications.Notify without waiting for a reply. */
bool bus_notify(const char *app, const char *title, const char *body);
-/* Read an integer setting through the XDG Settings portal, waiting briefly. */
+/* Read an integer setting through the XDG Settings portal, waiting briefly.
+ * A string holding a decimal integer also counts, as KDE reports them. */
bool portal_read_int(const char *ns, const char *key, int64_t *out);
+/* The KDE or GNOME double-click interval from the portal, or zero. */
+int portal_double_click_ms(void);
#endif