Conversation
Fixes Slackadays#190 The GUIClipboardDaemon created a new Wayland window every ~2 seconds to interact with the clipboard. This steals focus from the currently active window for a very short time, causing context menus and overlays to close. It basically made Clipboard unusable on Wayland. The simplest strategy of fixing this is to align Linux with all other platforms by only reading data from the clipboard on-demand instead of doing it continuously.
Can be reverted once Slackadays/Clipboard#203 was merged, released and incorporated into nixpkgs.
|
Unfortunately, this isn't a fix because this behavior enables automatically updating the clip history on platforms where it's supported. That means we need to still keep working in the background, but there are still a couple more options. The first is to use the Special Clipboard API provided by wlroots or to make this background behavior opt-out with maybe something like |
|
I've looked at the wlr_data_control API, and I think it's not a great solution yet because it's marked unstable and so might only create additional work in the future. It would be the most correct solution, though. Opt-out might be an option, but I feel the most reliable way of implementing this would be to only enable this functionality by default on X11 Linux for now, and add both What do you think, does that sound reasonable? |
|
Although the opt-out option might be the most stable going into the future, lots of users don't care about customizing software and will just leave it the default. That's why I think it would actually be best to implement the data control API because other clipboard managers also have and they did so long ago, and so any changes to the API would affect all clipboard managers, disincentivizing those changes. |
Fixes #190
The GUIClipboardDaemon created a new Wayland window every ~2 seconds to interact with the clipboard. This steals focus from the currently active window for a very short time, causing context menus and overlays to close. It basically made Clipboard unusable on Wayland.
The simplest strategy of fixing this is to align Linux with all other platforms by only reading data from the clipboard on-demand instead of doing it continuously.
As far as I could tell, this daemon was part of a yet-to-be completed feature, so it feels fine to remove it.
Tested systems
I tested this change on:
If you want to test
With Nix
(If you don't have flakes enabled by default, add
--extra-experimental-features nix-command --extra-experimental-features flakesto the first command)Manual
Download my branch, make sure you have all dependencies and tools installed. Then, run