]> git.mdlowis.com Git - proto/labwc.git/commit
xwayland: always offer focus in Globally Active case
authorJohn Lindgren <john@jlindgren.net>
Mon, 9 Jun 2025 15:11:32 +0000 (11:11 -0400)
committerJohn Lindgren <john@jlindgren.net>
Tue, 10 Jun 2025 15:03:54 +0000 (11:03 -0400)
commit8fb2ecefcbd66c4836f47d3b9451c8a380b6016f
treea6f5108822b1f9fa584eea8d293a4ef7387e456f
parent97ce4131bbef7c1365e501dcdd1551ce95df5ee5
xwayland: always offer focus in Globally Active case

In 9e3785f8cd7a, a heuristic was added to assume that NORMAL and DIALOG
window types were always focusable. (This was before we had the "offer
focus" mechanism in place.)

However, we should still call wlr_xwayland_surface_offer_focus() for
these views, in case they actually don't want focus. (This is uncommon
but has recently been seen with WeChat popups, which have both NORMAL
and UTILITY type.)

To make this possible, refine view_wants_focus() to return either
LIKELY or UNLIKELY for Globally Active input windows. This decouples
the question of "should we try to focus this view" from the actual
mechanism used to do so.
include/view.h
src/desktop.c
src/view.c
src/xwayland.c