]> git.mdlowis.com Git - proto/labwc.git/commit
desktop: allow re-focus between "globally active" views of the same PID
authorJohn Lindgren <john@jlindgren.net>
Sat, 14 Oct 2023 20:29:13 +0000 (16:29 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 16 Oct 2023 19:28:18 +0000 (20:28 +0100)
commitf6e3527767fffe81fa05073ae73893bb89a45d4f
treeab95cca527ef5c452e400acb037a14a9a679d2cd
parentdd7f563a507a12d9b8e03fc8c7b274540ccd5d34
desktop: allow re-focus between "globally active" views of the same PID

Commit 7e72bf975fb6 changed behavior to not automatically focus xwayland
views using the "Globally Active" input model (WM_HINTS.inputs = false
but WM_TAKE_FOCUS listed in WM_PROTOCOLS).

One undesired side effect of this change is that when a dialog is
closed, the parent window is not re-focused if "Globally Active". This
issue is seen for example with JDownloader. It can be solved taking a
similar approach to what is done for unmanaged xwayland views: allow
automatic re-focus between views sharing the same PID.

Note that it's difficult to completely solve all of the focus issues
with Globally Active views without proper WM_TAKE_FOCUS support.
Implementing proper support is difficult since it requires wlroots
changes and would also mean waiting for a message round-trip in
desktop_focus_topmost_view().

Fixes (partially): 7e72bf975fb65c8290b398d21b2ad9d87a22880f
("view/xwayland: avoid focusing views that don't want focus")
include/view.h
src/desktop.c
src/view.c