Menu

#114 Clipboard stops working in Windows client

v1.0_(example)
open
nobody
None
5
2023-05-12
2020-03-24
Tal Hayon
No

Copy paste stops working in windows client occasionaly stops working. I've managed to reproduce by copying an image inside the server and pasting outside. The window you're pasting to gets stuck, but even if it comes back, the copypaste functionality stops working completely.

I've tracked down the problem to xorg-server/hw/xwin/winclipboard/wndproc.c b/xorg-server/hw/xwin/winclipboard/wndproc.c

Seems like the last change was to count on the framework to count the timeout for the function. However it seems like it didn't exit the while loop (which is still there?).

The following change fixes it, though maybe a deeper rewrite is needed since the xserver does not return a notification for the request it received.

diff --git a/xorg-server/hw/xwin/winclipboard/wndproc.c b/xorg-server/hw/xwin/winclipboard/wndproc.c
index 8780e30e7..725ad7aa5 100755
--- a/xorg-server/hw/xwin/winclipboard/wndproc.c
+++ b/xorg-server/hw/xwin/winclipboard/wndproc.c
@@ -141,6 +141,7 @@ winProcessXEventsTimeout(HWND hwnd, Window iWindow, Display * pDisplay,

     if (!FD_ISSET(iConnNumber, &fdsRead)) {
         winDebug("winProcessXEventsTimeout - Spurious wake, select() returned %d\n", iReturn);
  • break;
    }
    }

Discussion

  • Tal Hayon

    Tal Hayon - 2020-03-24

    Neglected to mention that it doesn't exit the loop if timeout expired.

     
  • Ed Burns

    Ed Burns - 2021-08-28

    Thanks for finding and fixing this. This bug is continual pain in the workflow. Can someone please post a link to a build with this fix applied?

     
  • michael steiner

    michael steiner - 2022-08-19

    I guess commit 3bbd33 on master from 2022-02-10 is the fix for this issue? If so, what is the plan in terms of having an updated release of VcXsrv? Having switched from wslg to VcSrv a few days ago i also just run into this (or similar problem). Restarting X server mitigates it but obviously a bit painful, so a fix in a release would be appreciated :-)

     
  • Orion Poplawski

    Orion Poplawski - 2023-05-12

    x2go users would appreciate an updated release as well. Thanks.

     

Log in to post a comment.

MongoDB Logo MongoDB