]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: add explanatory comment on WM_HINTS.input
authorJohn Lindgren <john@jlindgren.net>
Wed, 27 Sep 2023 23:19:58 +0000 (19:19 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 29 Sep 2023 17:04:32 +0000 (18:04 +0100)
src/xwayland.c

index 57094d7fbcdc362c1dc7429933ef2f946e24b8b4..c07a18b76a98b99e1020d42e99c11f0e2595b896 100644 (file)
@@ -37,6 +37,20 @@ xwayland_view_wants_focus(struct view *view)
        if (!hints) {
                return true;
        }
+       /*
+        * Paraphrased from ICCCM section 4.1.7 (Input Focus):
+        *
+        * Clients set the input field of WM_HINTS to True to indicate
+        * that they require window manager assistance in acquiring the
+        * input focus. Clients set the input field to False to request
+        * that the window manager not set the input focus to their
+        * top-level window.
+        *
+        * Clients that use XSetInputFocus() to explicitly set the input
+        * focus should set the WM_TAKE_FOCUS atom in WM_PROTOCOLS.
+        * Currently, labwc does not support this method of taking focus
+        * and thus makes no use of WM_TAKE_FOCUS.
+        */
        return (bool)hints->input;
 }