wlroots
wlroots copied to clipboard
Don't send offers to new windows before first interaction
Currently it's possible to steal the current selection by creating a new window (which can be transparent).
Instead we could wait for the first interaction with the window (key press, click, …) to send selection offers.
wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1398
Yes, there are such clients. But at least until https://github.com/swaywm/wlr-protocols/pull/25 is merged, I think allowing this as a workaround is actually a good thing. Once we have a viable alternative I agree we should fix this.
Instead we could wait for the first interaction with the window (key press, click, …) to send selection offers.
I believe modifiers key presses should not be counted as a first interaction, so it is possible to close the window using a key binding without exposing the clipboard.
Would need to make sure we send offers before the actual interaction event though, so something like "open a new window, first interaction is middle-click paste" still works. Although with protocols being asynchronous, if you wait for that middle-click to send the offer it might be somewhat unreliable?..
Would need to make sure we send offers before the actual interaction event though, so something like "open a new window, first interaction is middle-click paste" still works.
That's the same as "window is not focused, focus it with middle-click paste", which works currently.
Although with protocols being asynchronous, if you wait for that middle-click to send the offer it might be somewhat unreliable?..
Asynchronous doesn't mean out-of-order.
Asynchronous doesn't mean out-of-order.