xserver: Branch 'master' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Fri Jun 9 00:47:58 EEST 2006


 hw/xwin/winclipboardwndproc.c |   43 ++++++++++++++++--------------------------
 hw/xwin/wincreatewnd.c        |    6 +++--
 2 files changed, 21 insertions(+), 28 deletions(-)

New commits:
diff-tree 576e6fb1124a47493371210adf99d6f2076e72c5 (from d42cf4a2a4980fdd29fb15c4fd8fddda67b36256)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date:   Thu Jun 8 17:49:02 2006 -0400

    Bug #7120: Multimonitor (non-Xinerama) support for xwin servers.
    (Tom Whittock)

diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c
index 7c93e40..796a085 100644
--- a/hw/xwin/wincreatewnd.c
+++ b/hw/xwin/wincreatewnd.c
@@ -58,6 +58,8 @@ winCreateBoundingWindowFullScreen (Scree
 {
   winScreenPriv(pScreen);
   winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
+  int			iX = pScreenInfo->dwInitialX;
+  int			iY = pScreenInfo->dwInitialY;
   int			iWidth = pScreenInfo->dwWidth;
   int			iHeight = pScreenInfo->dwHeight;
   HWND			*phwnd = &pScreenPriv->hwndScreen;
@@ -99,8 +101,8 @@ winCreateBoundingWindowFullScreen (Scree
 			    WINDOW_CLASS,	/* Class name */
 			    szTitle,		/* Window name */
 			    WS_POPUP,
-			    0,			/* Horizontal position */
-			    0,			/* Vertical position */
+			    iX,			/* Horizontal position */
+			    iY,			/* Vertical position */
 			    iWidth,		/* Right edge */ 
 			    iHeight,		/* Bottom edge */
 			    (HWND) NULL,	/* No parent or owner window */
diff-tree d42cf4a2a4980fdd29fb15c4fd8fddda67b36256 (from 3930da3f6209312dd0f10aba0b16ef45996a07fe)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date:   Thu Jun 8 17:46:53 2006 -0400

    Bug #7121: fix clipboard handling in Xming (Colin Harrison)

diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c
index a006b46..369aac5 100644
--- a/hw/xwin/winclipboardwndproc.c
+++ b/hw/xwin/winclipboardwndproc.c
@@ -35,6 +35,8 @@
 #include <sys/time.h>
 #include "winclipboard.h"
 
+extern void		winFixClipboardChain();
+
 
 /*
  * Constants
@@ -181,28 +183,10 @@ winClipboardWindowProc (HWND hwnd, UINT 
 
     case WM_CHANGECBCHAIN:
       {
-	static Bool s_fProcessingChangeCBChain = FALSE;
 	winDebug ("winClipboardWindowProc - WM_CHANGECBCHAIN: wParam(%x) "
 		  "lParam(%x) s_hwndNextViewer(%x)\n", 
 		  wParam, lParam, s_hwndNextViewer);
 
-
-	/*
-	 * We've occasionally seen a loop in the clipboard chain.  Break
-	 * it on the first hint of recursion.
-	 */
-	if (! s_fProcessingChangeCBChain) 
-	  {
-	    s_fProcessingChangeCBChain = TRUE;
-	  }
-	else
-	  {
-	    winErrorFVerb (1, "winClipboardWindowProc - WM_CHANGECBCHAIN - "
-			   "Nested calls detected.  Bailing.\n");
-	    winDebug ("winClipboardWindowProc - WM_CHANGECBCHAIN: Exit\n");
-	    return 0;
-	  }
-	
 	if ((HWND) wParam == s_hwndNextViewer)
 	  {
 	    s_hwndNextViewer = (HWND) lParam;
@@ -217,7 +201,6 @@ winClipboardWindowProc (HWND hwnd, UINT 
 	  SendMessage (s_hwndNextViewer, message,
 		       wParam, lParam);
 
-	s_fProcessingChangeCBChain = FALSE;
       }
       winDebug ("winClipboardWindowProc - WM_CHANGECBCHAIN: Exit\n");
       return 0;
@@ -274,8 +257,8 @@ winClipboardWindowProc (HWND hwnd, UINT 
 	winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Enter\n");
 
 	/*
-	 * We've occasionally seen a loop in the clipboard chain.  Break
-	 * it on the first hint of recursion.
+	 * We've occasionally seen a loop in the clipboard chain.
+	 * Try and fix it on the first hint of recursion.
 	 */
 	if (! s_fProcessingDrawClipboard) 
 	  {
@@ -283,16 +266,17 @@ winClipboardWindowProc (HWND hwnd, UINT 
 	  }
 	else
 	  {
+	    /* Attempt to break the nesting by getting out of the chain, twice?, and then fix and bail */
+	    s_fCBCInitialized = FALSE;
+	    ChangeClipboardChain (hwnd, s_hwndNextViewer);
+	    winFixClipboardChain();
 	    winErrorFVerb (1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - "
-			   "Nested calls detected.  Bailing.\n");
+			   "Nested calls detected.  Re-initing.\n");
 	    winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
+	    s_fProcessingDrawClipboard = FALSE;
 	    return 0;
 	  }
 
-	/* Pass the message on the next window in the clipboard viewer chain */
-	if (s_hwndNextViewer)
-	  SendMessage (s_hwndNextViewer, message, 0, 0);
-	
 	/* Bail on first message */
 	if (!s_fCBCInitialized)
 	  {
@@ -318,6 +302,8 @@ winClipboardWindowProc (HWND hwnd, UINT 
 		    "We own the clipboard, returning.\n");
 	    winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
 	    s_fProcessingDrawClipboard = FALSE;
+	    if (s_hwndNextViewer)
+		SendMessage (s_hwndNextViewer, message, wParam, lParam);
 	    return 0;
 	  }
 
@@ -379,6 +365,8 @@ winClipboardWindowProc (HWND hwnd, UINT 
 
 	    winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
 	    s_fProcessingDrawClipboard = FALSE;
+	    if (s_hwndNextViewer)
+		SendMessage (s_hwndNextViewer, message, wParam, lParam);
 	    return 0;
 	  }
 
@@ -422,6 +410,9 @@ winClipboardWindowProc (HWND hwnd, UINT 
 	s_fProcessingDrawClipboard = FALSE;
       }
       winDebug ("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n");
+      /* Pass the message on the next window in the clipboard viewer chain */
+      if (s_hwndNextViewer)
+	SendMessage (s_hwndNextViewer, message, wParam, lParam);
       return 0;
 
 



More information about the xorg-commit mailing list