labwc/include
Johan Malm e4046c5850 cursor: process layer subsurfaces in cursor_button_press()
...to give keyboard focus to layer-shell clients if exclusive or on-demand
interactivity is set, so that menu popups can be navigated with the
keyboard. This still only works if the client is in top (or overlay)
layers. Support for bottom and background to be done as a separate patch
set.

Revert 06b19f0 to process layer-shell subsurfaces in
`cursor_button_press()`, but only when their parent layer-shell surface
has keyboard interactivity.

Fix bug in `get_cursor_context()` which resulted in layer-surfaces not
being detected correctly.

Background:

Commit 06b19f0 (issue #1131) disabled processing of layer-shell
subsurfaces in cursor_button_press() because when pressing a task in
Waybar (Gtk panel using layer-shell subsurfaces) the foreign-toplevel
minimize-raise action did not work correctly as the action logic relied on
the recipient window being activated and by clicking on the panel, the
panel itself was both surface-focusd and activated (and thus the window
de-activated).

The un-intended consequence was that by not responding to layer-subsurface
cursor buttons presses, layer-shell clients (such as panels) were not
given keyboard focus if they indeed wanted it by setting exclusive or
on-demand keyboard interactivity.

The good news is that that following @jlindgren90's refactoring (various)
the only place where we call `view_set_actived()` is in
`focus_change_notify()` in `seat.c` and we now only do it for views
(bb8f0bc).

Another side-effect (positive) of 06b19f0 was that a Waybar dnd bug was
fixed (pointer-serial-number validation failure).

Have tested with sfwbar, waybar and tint (test-panel) the following
results:
- Minimize-raise works even when on-demand keyboard interactivity is set
- Keyboard interactivity is given popup-menus (sfwbar and tint) when the
  panels are in the top layer (support for bottom will be as a separate
  patch set)
- Waybar dnd still works (even when hard-coding keyboard-interactivity)

References:
- bb8f0bc960
- 40ce95a68c/src/seat.c (L481-L483)
- 40ce95a68c/src/dnd.c (L24)
- https://github.com/johanmalm/tint

Fixes: #1572
2024-03-08 19:24:54 +00:00
..
button theme: move more button fallback logic to theme.c 2023-12-21 02:42:23 +01:00
common cursor: process layer subsurfaces in cursor_button_press() 2024-03-08 19:24:54 +00:00
config osd: optionally show windows on all workspaces 2024-03-05 22:16:55 +01:00
input IME: support input method 2024-03-05 20:28:15 +00:00
menu menu: use wl_list instead of array 2023-10-10 06:17:37 +01:00
action.h action: add If and ForEach actions 2023-10-01 14:17:29 +01:00
buffer.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
debug.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
decorations.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
dnd.h chase (dnd): refactor to use wlroot's scene_drag_icon 2023-12-03 18:24:26 +00:00
edges.h edges: do not apply resistance to invisible edges 2024-02-14 21:20:45 +00:00
idle.h Add support for ext_idle_notify_v1.. 2023-07-09 08:26:33 +01:00
labwc.h osd: show preview for windows on other workspaces 2024-03-05 22:16:55 +01:00
layers.h src/layers.c: delay popup unconstrain until after first commit 2024-02-25 11:49:03 +00:00
meson.build Make xwayland support optional 2020-12-30 10:29:21 +00:00
node.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
placement.h view: honor automatic placement when adjusting floating geometry 2023-12-30 16:50:09 +00:00
regions.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
resistance.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
resize_indicator.h Add window resize indicator 2023-08-19 18:37:16 +02:00
session-lock.h session-lock: reconfigure for output layout changes 2023-10-05 20:10:37 +01:00
snap.h edges, resistance, snap: unified resistance and snapping engine 2024-01-30 15:02:17 -05:00
ssd-internal.h src/ssd: refactor button hover and maximize toggle 2023-12-08 20:55:50 +00:00
ssd.h feat: add Shade/Unshade/ToggleShade actions 2024-01-15 21:37:36 +00:00
theme.h theme: use non-hover button variants as fallback 2023-12-21 02:42:23 +01:00
view-impl-common.h view: commonize sub-view logic in view_move_to_front/back() 2023-10-21 15:40:56 +01:00
view.h window-rules: add root-toplevel critiera 2024-03-05 22:16:55 +01:00
window-rules.h window-rules: add fixedPosition property 2023-11-10 21:46:15 +01:00
workspaces.h desktop: switch workspaces and optionally raise in desktop_focus_view() 2023-09-28 03:38:51 +02:00
xwayland.h xwayland: support querying window types 2024-01-25 21:14:30 +00:00