Closed ids1024 closed 4 months ago
Added a commit changing how same_client_as
works for stacks, which should be necessary to prevent a background window in a stack from setting the clipboard.
Not sure if anything else uses same_client_as
that might for some reason need the previous behavior, but I wouldn't expect it.
This should fix https://github.com/pop-os/cosmic-comp/issues/494, and make clipboard and primary focus consistently correct.
Changing the active element of a stack needs to change the clipboard focus, but it wasn't being changed since the
KeyboardFocusTarget
was unchanged. TheCosmicStack
methods that change the active stack element also have no obvious way to change the keyboard focus. So we can set this inrefresh_focus
, which should be correct.If the new focus
WlSurface
isNone
, this clears the focus instead of leaving it as the previous code did. I believe that is desirable.Requires https://github.com/Smithay/smithay/pull/1442 to avoid repeated
offer
s, instead of only when focus changed.(Perhaps this could better be solved by having a
WlSurface
variant ofKeyboardFocusTarget
, like pointer focus, or some mechanism for a stack of focus, which could help other things. But it's also unclear exactly how that would work with the code for setting the active stack element, among other questions.)