diff options
author | marha <marha@users.sourceforge.net> | 2013-07-25 09:24:55 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-25 09:24:55 +0200 |
commit | af62a89a4e677bc0a10094be86816b2e273b2c4a (patch) | |
tree | 3cceb0e23b7ab79dbcedb27c5546cf2666c1c7a0 /xorg-server/hw/xwin/winclipboardthread.c | |
parent | de54c5b749b3eefb75d420840c889533a58aa342 (diff) | |
parent | acf3535c75d7c79154b6b89c66567317944d244c (diff) | |
download | vcxsrv-af62a89a4e677bc0a10094be86816b2e273b2c4a.tar.gz vcxsrv-af62a89a4e677bc0a10094be86816b2e273b2c4a.tar.bz2 vcxsrv-af62a89a4e677bc0a10094be86816b2e273b2c4a.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xserver mesa git update 25 Jul 2013
Conflicts:
xorg-server/hw/xwin/win.h
xorg-server/hw/xwin/winclipboardthread.c
xorg-server/hw/xwin/winglobals.c
xorg-server/hw/xwin/winmouse.c
xorg-server/hw/xwin/winmultiwindowclass.c
xorg-server/hw/xwin/winscrinit.c
xorg-server/hw/xwin/winwin32rootless.c
xorg-server/hw/xwin/winwin32rootlesswndproc.c
xorg-server/hw/xwin/winwindow.h
xorg-server/hw/xwin/winwindowswm.c
xorg-server/hw/xwin/winwndproc.c
Diffstat (limited to 'xorg-server/hw/xwin/winclipboardthread.c')
-rw-r--r--[-rwxr-xr-x] | xorg-server/hw/xwin/winclipboardthread.c | 87 |
1 files changed, 40 insertions, 47 deletions
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c index d000b0205..488a00fcc 100755..100644 --- a/xorg-server/hw/xwin/winclipboardthread.c +++ b/xorg-server/hw/xwin/winclipboardthread.c @@ -53,11 +53,11 @@ extern Bool g_fUnicodeClipboard; extern Bool g_fClipboardStarted; -extern Bool g_fClipboardLaunched; +extern Bool g_fClipboardLaunched; extern HWND g_hwndClipboard; extern void *g_pClipboardDisplay; extern Window g_iClipboardWindow; -extern Bool g_fClipboardPrimary; +extern Bool g_fClipboardPrimary; /* * Global variables @@ -199,7 +199,7 @@ winClipboardProc(void *pvNotUsed) fdMessageQueue = open (WIN_MSG_QUEUE_FNAME, _O_RDONLY); if (fdMessageQueue == -1) { ErrorF("winClipboardProc - Failed opening %s\n", WIN_MSG_QUEUE_FNAME); - goto thread_errorexit; + goto thread_errorexit; } /* Find max of our file descriptors */ @@ -240,27 +240,27 @@ winClipboardProc(void *pvNotUsed) /* Assert ownership of selections if Win32 clipboard is owned */ if (NULL != GetClipboardOwner()) { - if (g_fClipboardPrimary) - { - /* PRIMARY */ - winDebug("winClipboardProc - asserted ownership.\n"); - iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY, - iWindow, CurrentTime); - if (iReturn == BadAtom || iReturn == BadWindow /*|| - XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow*/) - { - ErrorF ("winClipboardProc - Could not set PRIMARY owner\n"); - goto thread_errorexit; - } - } + if (g_fClipboardPrimary) + { + /* PRIMARY */ + winDebug("winClipboardProc - asserted ownership.\n"); + iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY, + iWindow, CurrentTime); + if (iReturn == BadAtom || iReturn == BadWindow /*|| + XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow*/) + { + ErrorF ("winClipboardProc - Could not set PRIMARY owner\n"); + goto thread_errorexit; + } + } /* CLIPBOARD */ iReturn = XSetSelectionOwner(pDisplay, atomClipboard, iWindow, CurrentTime); - if (iReturn == BadAtom || iReturn == BadWindow /*|| - XGetSelectionOwner (pDisplay, atomClipboard) != iWindow*/) - { - ErrorF ("winClipboardProc - Could not set CLIPBOARD owner\n"); + if (iReturn == BadAtom || iReturn == BadWindow /*|| + XGetSelectionOwner (pDisplay, atomClipboard) != iWindow*/) + { + ErrorF ("winClipboardProc - Could not set CLIPBOARD owner\n"); goto thread_errorexit; } } @@ -334,19 +334,12 @@ winClipboardProc(void *pvNotUsed) } /* Branch on which descriptor became active */ -// if (FD_ISSET (iConnectionNumber, &fdsRead)) -// { Also do it when no read since winClipboardFlushXEvents -// is sending the output. +// if (FD_ISSET (iConnectionNumber, &fdsRead)) { +// Also do it when no read since winClipboardFlushXEvents +// is sending the output. /* Process X events */ - /* Exit when we see that server is shutting down */ - iReturn = winClipboardFlushXEvents(hwnd, - iWindow, pDisplay, fUseUnicode, FALSE); - if (WIN_XEVENTS_SHUTDOWN == iReturn) { - ErrorF("winClipboardProc - winClipboardFlushXEvents " - "trapped shutdown event, exiting main loop.\n"); - break; - } -// } + winClipboardFlushXEvents(hwnd, iWindow, pDisplay, fUseUnicode, FALSE); +// } #ifdef HAS_DEVWINDOWS /* Check for Windows event ready */ @@ -403,25 +396,25 @@ winClipboardProc(void *pvNotUsed) goto commonexit; thread_errorexit: - if (g_pClipboardDisplay && g_iClipboardWindow) - { - iReturn = XDestroyWindow (g_pClipboardDisplay, g_iClipboardWindow); - if (iReturn == BadWindow) - ErrorF ("winClipboardProc - XDestroyWindow returned BadWindow.\n"); + if (g_pClipboardDisplay && g_iClipboardWindow) + { + iReturn = XDestroyWindow (g_pClipboardDisplay, g_iClipboardWindow); + if (iReturn == BadWindow) + ErrorF ("winClipboardProc - XDestroyWindow returned BadWindow.\n"); #ifdef WINDBG - else - winDebug ("winClipboardProc - XDestroyWindow succeeded.\n"); + else + winDebug ("winClipboardProc - XDestroyWindow succeeded.\n"); #endif - } - winDebug ("Clipboard thread died.\n"); + } + winDebug ("Clipboard thread died.\n"); commonexit: - g_iClipboardWindow = None; - g_pClipboardDisplay = NULL; - g_fClipboardLaunched = FALSE; - g_fClipboardStarted = FALSE; + g_iClipboardWindow = None; + g_pClipboardDisplay = NULL; + g_fClipboardLaunched = FALSE; + g_fClipboardStarted = FALSE; - pthread_cleanup_pop(0); + pthread_cleanup_pop(0); return NULL; } @@ -458,7 +451,7 @@ winClipboardErrorHandler(Display * pDisplay, XErrorEvent * pErr) static int winClipboardIOErrorHandler(Display * pDisplay) { - ErrorF("winClipboardIOErrorHandler!\n\n"); + ErrorF("winClipboardIOErrorHandler!\n"); if (pthread_equal(pthread_self(), g_winClipboardProcThread)) { /* Restart at the main entry point */ |