Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not too much to see here code-wise at the moment (just an initial attempt at combining
LockSurface
andPopup
focus targets into aWlSurface
target). But I figure I may as well start a WIP PR now that I've been looking into what to change here.Updating cosmic-comp for Smithay/smithay#1326 is fairly complicated. Particularly trying to do things more correctly, and not just copying the logic from the trait impls removed there. Adjusting how pointer focuses are defined without updating to that commit seems like a good place to start iterating on things without have to address everything at once.
The Wayland protocol spec doesn't define how exactly input to subsurfaces works, but on KDE, Gnome Shell, And Sway:
On cosmic-comp, it seems with a couple subsurfaces, some but not all subsurfaces can get pointer focus? So something isn't quite right.
Given how we were implementing
PointerTarget
forPopup
andLockSurface
to just call thePointerTarget
methods on theWlSurface
, we're presumably also not sending pointer input to subsurfaces of theLockSurface
orPopup
. So we want to have aPointerFocusTarget::WlSurface
with the subsurface.Meanwhile, for
KeyboardFocusTarget
, we don't want to have a subsurface as the focus. And it seems some code here does care that the keyboard focus is a popup... I wonder if condensing into aKeyboardFocusTarget::WlSurface
makes as much sense as the simplification of combining surface types into aPointerFocusTarget::WlSurface
.