]> git.mdlowis.com Git - proto/labwc.git/commit
layer: try to set keyboard focus on map
authorJohan Malm <jgm323@gmail.com>
Sun, 24 Mar 2024 19:31:29 +0000 (19:31 +0000)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 24 Mar 2024 22:00:13 +0000 (23:00 +0100)
commit4fc6bce3ea9f6d08b6efd6c022bea5030e543c06
treec8ff5ce877fc64d6ecbb33ea2b4bc62eb1df6d58
parentf3b68b8fb563c80d3aa7983734fb60491048c3fe
layer: try to set keyboard focus on map

...for the following reasons:

1. We interpret 'normal input-focus semantics' for clients with on-demand
   keyboard interactivity to means that a surface receives input focus on
   cursor-button-press AND on map (the latter previously missing), just
   like a normal window would. In this regard, we do not differentiate
   between layers.

2. Most layer-surfaces set the keyboard interactivity at a similar time to
   their first (and normally only) map, so the absence of an explicit
   attempt to focus on map does not make a difference. However, for a
   long-running layer-shell client (such as lxqt-runner) which sets the
   interactivity on launch and then maps/unmaps many times throughout its
   lifetime, a specific focus-attempt is required on map to avoid the
   client itself having to keep resetting its interactivity to grab the
   keyboard on map.

3. Compositors like sway and river process focus (for clients with
   keyboard-interactivity)  in their map-handlers, so this makes for a
   common approach.

Fixes: #1653
src/layers.c