http://bugs.winehq.org/show_bug.cgi?id=59519 --- Comment #6 from AYourk <ayourk@gmail.com> --- (In reply to erlofgrey from comment #5)
hey,
tried your proton build and it appears to work fine unless you switch to wayland ( PROTON_ENABLE_WAYLAND=0 ). Would there be a way to adapt that fix for wayland as well?
thanks, Martin
The fix in this MR targets the OLE clipboard layer (dlls/ole32/clipboard.c), which caches a stale window handle after the STA thread exits. That's the bug that causes CLIPBRD_E_CANT_OPEN and the ~1 second freeze on subsequent copies. The fix works correctly under both X11 and Wayland at the OLE level — OleSetClipboard succeeds on all subsequent calls. What you're seeing under Wayland is a separate, lower-level limitation. Wayland's security model requires a valid input serial (from a recent keyboard or pointer event) and active surface focus to call wl_data_device_set_selection(). If the compositor doesn't support the zwlr_data_control_manager_v1 extension (GNOME/Mutter notably doesn't), Wine falls back to the core wl_data_device protocol which enforces this restriction. When the clipboard update arrives at the Wayland driver without a valid serial or without surface focus, the export to the compositor is silently skipped — the data is set correctly inside Wine, but never reaches the Wayland clipboard. This is by design in the Wayland protocol. X11 has no such restriction (any client can assert selection ownership at any time), which is why PROTON_ENABLE_WAYLAND=0 works around it. You can confirm which protocol your compositor uses by running: wayland-info 2>/dev/null | grep zwlr_data_control If that returns nothing, your compositor uses the fallback path with the serial/focus requirement. Compositors based on wlroots (Sway, Hyprland, etc.) and KDE/KWin support the extension and shouldn't have this issue. This isn't something the OLE clipboard fix can address — the Wayland driver (dlls/winewayland.drv/wayland_data_device.c) would need to handle the case where clipboard_update() is called without a current serial, perhaps by deferring the export until the next input event. That's a Wayland driver issue rather than an OLE issue, and would warrant its own bug report. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.