Fix polling/watching clipboard on Linux Wayland#145
Fix polling/watching clipboard on Linux Wayland#145tranquil-tr0 wants to merge 5 commits intoSathvik-Rao:mainfrom
Conversation
|
Note that this currently wouldn't work on GNOME/Mutter (and assorted other compositors, though there is implementation across multiple most popular compositors already) (although it would in the future as the protocol is slated to enter stable), but I don't think the previous (polling) implementation would've (worked on mutter) either and the polling with wl-clipboard is still kept as a fallback. |
|
status of implementation https://wayland.app/protocols/wayland-protocols/336#compositor-support |
|
This does not fallback correctly. The app will still exit with a ModuleNotFoundError or ImportError if the dependency isn't found because it tries to import in clipboard_monitor_linux.py |
|
I'm trying it, but can't seem to make it work on my machine using Fedora KDE with KWin updated to 6.6. I'll do troubleshooting on my own. |
|
I have done some research. It appears that tkinter provides a |
Are you using the system package (python-pywayland)? In my testing when getting the dependency from |
Another option is to use wl-paste --watch, but this doesn't work unless you force the user to build wl-clipboard, since they've merged the change but their last release was in 2023. The issue with wl-paste --watch can be seen mentioned in the new release issue in wl-clipboard. |
Fix #124 & #135 by implement interaction with ext_data_control_v1 Wayland protocol via pywayland, fixes implementation issues caused by polling (focus stealing, busy wait inefficiency, etc.).