Ulrich Czekalla ulrich@codeweavers.com writes:
Sure, I'll take a look.
Once at it, let me express my concerns. Before that last patch went in, I was using the following local modifications:
Index: dlls/x11drv/clipboard.c =================================================================== RCS file: /home/wine/wine/dlls/x11drv/clipboard.c,v retrieving revision 1.8 diff -u -r1.8 clipboard.c --- dlls/x11drv/clipboard.c 23 Jan 2003 21:32:35 -0000 1.8 +++ dlls/x11drv/clipboard.c 25 Mar 2003 15:36:52 -0000 @@ -165,10 +165,6 @@ case CF_TEXT: return None;
- case CF_UNICODETEXT: - prop = XA_STRING; - break; - case CF_DIB: case CF_BITMAP: {
I wanted to move Unicode text between Windows applications, but the above rule always converted it to iso-8859-1, destroying the contents. As far as I remember, there was no mechanism to offer (for a TARGET request) several possible transfer formats, raw internal being the preference, followed by other less convenient formats.
@@ -947,6 +943,16 @@ if ( !(selectionAcquired == (S_PRIMARY | S_CLIPBOARD)) ) { Atom xaClipboard = TSXInternAtom(display, _CLIPBOARD, False); + BOOL TempWndCreated = False; + + if (hWndClipWindow == NULL) + { + hWndClipWindow = CreateWindowA ("STATIC", NULL, 0, + 0, 0, 0, 0, + NULL, NULL, NULL, NULL); + TempWndCreated = True; + } + owner = X11DRV_get_whole_window( GetAncestor( hWndClipWindow, GA_ROOT ) );
/* Grab PRIMARY selection if not owned */ @@ -968,6 +974,9 @@ selectionWindow = owner; TRACE("Grabbed X selection, owner=(%08x)\n", (unsigned) owner); } + + if (TempWndCreated) + DestroyWindow (hWndClipWindow); } }
X11DRV_AcquireClipboard can be called with NULL hWndClipWindow (as documented on MSDN). The above hack came over it without introducing new global state, but clearly is not right. Worked for me, though.
I wanted to investigate and find real fixes for both problems, but after your recent patches I will have to learn the new ways first. And I do not really have the time anyway, so I thought I had better tell about them at least.
Feri.