xserver: Branch 'master' - 12 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Jan 9 13:22:54 PST 2012


 hw/xwin/Makefile.am              |    3 ++-
 hw/xwin/winclipboard.h           |    1 -
 hw/xwin/winclipboardthread.c     |    2 ++
 hw/xwin/winengine.c              |    7 ++-----
 hw/xwin/winmultiwindowwm.c       |   12 +++++++-----
 hw/xwin/winnativegdi.c           |    7 ++++---
 hw/xwin/winpfbdd.c               |    6 +++---
 hw/xwin/winrandr.c               |    2 --
 hw/xwin/winshadgdi.c             |    1 -
 hw/xwin/winwin32rootless.c       |    4 +---
 hw/xwin/winwin32rootlesswindow.c |    3 ++-
 11 files changed, 23 insertions(+), 25 deletions(-)

New commits:
commit e722ad6c3efa57b806ca0f2dc13114bd3619a88c
Merge: e476af4... 4e44580...
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Jan 9 13:22:28 2012 -0800

    Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes'

commit 4e44580efd4522ced644c698336d2f6ea54f3917
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Nov 4 14:29:01 2011 -0500

    hw/xwin: Include manifest file in the dist tarball
    
    Commit c02638fd added the manifest file, but didn't add it to EXTRA_DIST.
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 256af0b..c490163 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -175,7 +175,8 @@ install-exec-hook:
 EXTRA_DIST = \
 	$(xwinconfig_DATA) \
 	X.ico \
-	XWin.rc
+	XWin.rc \
+	XWin.exe.manifest
 
 relink:
 	$(AM_V_at)rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT)
commit c763fe51b8ff18e204caab9cf97376a1b72324f0
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Nov 4 13:17:50 2011 -0500

    hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
    
    hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
    but still provide it if building for Win32 without autotools
    
    xserver/hw/xwin/winclipboard.h:42:0: warning: "HAS_WINSOCK" redefined
    ../../include/xwin-config.h:11:0: note: this is the location of the previous definition
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h
index 089c291..6b5249f 100644
--- a/hw/xwin/winclipboard.h
+++ b/hw/xwin/winclipboard.h
@@ -39,7 +39,6 @@
 #include <sys/select.h>
 #else
 #include <X11/Xwinsock.h>
-#define HAS_WINSOCK
 #endif
 #include <fcntl.h>
 #include <setjmp.h>
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index e7df452..908dfce 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -32,6 +32,8 @@
 
 #ifdef HAVE_XWIN_CONFIG_H
 #include <xwin-config.h>
+#else
+#define HAS_WINSOCK 1
 #endif
 #include <sys/types.h>
 #include "winclipboard.h"
commit 3d80f202b06227f7fc03b674f5fbf809c2d1efb2
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Oct 28 09:56:19 2011 -0500

    hw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow()
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index 214e895..fbff838 100644
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
@@ -202,7 +202,8 @@ winMWExtWMDecorateWindow (HWND hwnd, LPARAM lParam)
   /* Check if the Windows window property for our X window pointer is valid */
   if ((pRLWinPriv = (win32RootlessWindowPtr)GetProp (hwnd, WIN_WINDOW_PROP)) != NULL)
     {
-      pScreen				= pRLWinPriv->pFrame->win->drawable.pScreen;
+      if (pRLWinPriv != NULL && pRLWinPriv->pFrame != NULL && pRLWinPriv->pFrame->win != NULL)
+        pScreen				= pRLWinPriv->pFrame->win->drawable.pScreen;
       if (pScreen) pScreenPriv		= winGetScreenPriv(pScreen);
       if (pScreenPriv) pScreenInfo	= pScreenPriv->pScreenInfo;
       if (pRLWinPriv && pScreenInfo) winMWExtWMUpdateWindowDecoration (pRLWinPriv, pScreenInfo);
commit c824004b4592b3d86b3514be7cab37b36642b13a
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Oct 28 09:56:11 2011 -0500

    hw/xwin: Fix possible null ptr deref in winMWExtWMRestackFrame()
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index d9e71c0..91399c2 100644
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -551,7 +551,7 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
   winDebug ("winMWExtWMRestackFrame (%08x)\n", (int) pRLWinPriv);
 #endif
 
-  if (pScreenPriv->fRestacking) return;
+  if (pScreenPriv && pScreenPriv->fRestacking) return;
 
   if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo;
 
commit 3c501691a0a9fa17da4e2cc84f55010ef2a4790d
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Oct 28 09:52:34 2011 -0500

    hw/xwin: Fix possible null ptr deref in winActivateAppPrimaryDD()
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winpfbdd.c b/hw/xwin/winpfbdd.c
index a399020..1a5a0e7 100644
--- a/hw/xwin/winpfbdd.c
+++ b/hw/xwin/winpfbdd.c
@@ -461,12 +461,12 @@ static Bool
 winActivateAppPrimaryDD (ScreenPtr pScreen)
 {
   winScreenPriv(pScreen);
-  winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
   RECT			rcSrc, rcClient;
   HRESULT		ddrval = DD_OK;
 
   /* Check for errors */
   if (pScreenPriv == NULL
+      || pScreenPriv->pScreenInfo == NULL
       || pScreenPriv->pddsPrimary == NULL
       || pScreenPriv->pddsOffscreen == NULL)
     return FALSE;
@@ -500,8 +500,8 @@ winActivateAppPrimaryDD (ScreenPtr pScreen)
   /* Setup a source rectangle */
   rcSrc.left = 0;
   rcSrc.top = 0;
-  rcSrc.right = pScreenInfo->dwWidth;
-  rcSrc.bottom = pScreenInfo->dwHeight;
+  rcSrc.right = pScreenPriv->pScreenInfo->dwWidth;
+  rcSrc.bottom = pScreenPriv->pScreenInfo->dwHeight;
 
   ddrval = IDirectDrawSurface2_Blt (pScreenPriv->pddsPrimary,
 				    &rcClient,
commit a492c02649de4c60ac21a7fcb6b7c730b558dca6
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Oct 28 09:49:00 2011 -0500

    hw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI()
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winnativegdi.c b/hw/xwin/winnativegdi.c
index 4d7afe8..68f8020 100644
--- a/hw/xwin/winnativegdi.c
+++ b/hw/xwin/winnativegdi.c
@@ -315,7 +315,6 @@ static Bool
 winActivateAppNativeGDI (ScreenPtr pScreen)
 {
   winScreenPriv(pScreen);
-  winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
 
   /*
    * Are we active?
@@ -323,7 +322,8 @@ winActivateAppNativeGDI (ScreenPtr pScreen)
    */
   if (pScreenPriv != NULL
       && pScreenPriv->fActive
-      && pScreenInfo->fFullScreen)
+      && pScreenPriv->pScreenInfo
+      && pScreenPriv->pScreenInfo->fFullScreen)
     {
       /*
        * Activating, attempt to bring our window 
@@ -338,7 +338,8 @@ winActivateAppNativeGDI (ScreenPtr pScreen)
    */
   if (pScreenPriv != NULL
       && !pScreenPriv->fActive
-      && pScreenInfo->fFullScreen)
+      && pScreenPriv->pScreenInfo
+      && pScreenPriv->pScreenInfo->fFullScreen)
     {
       /*
        * Deactivating, stuff our window onto the
commit b907079596bc8600d3420c189409053b0b5016f6
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Oct 28 09:46:56 2011 -0500

    hw/xwin: Clarify an if statement mixed with ifdef in winSetEngine()
    
    Use the same pattern as elsewhere so it's a bit clearer what we
    are checking
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winengine.c b/hw/xwin/winengine.c
index e866e1e..752c4fe 100644
--- a/hw/xwin/winengine.c
+++ b/hw/xwin/winengine.c
@@ -192,15 +192,12 @@ winSetEngine (ScreenPtr pScreen)
 
   /* ShadowGDI is the only engine that supports Multi Window Mode */
   if (
-#ifdef XWIN_MULTIWINDOWEXTWM
-      pScreenInfo->fMWExtWM
-#else
       FALSE
+#ifdef XWIN_MULTIWINDOWEXTWM
+      || pScreenInfo->fMWExtWM
 #endif
 #ifdef XWIN_MULTIWINDOW
       || pScreenInfo->fMultiWindow
-#else
-      || FALSE
 #endif
       )
     {
commit 5c35dd7be716a3464f012c92866919a3606f9beb
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Thu Oct 27 15:49:59 2011 -0500

    hw/xwin: Fix rrScreenSetSize function pointer mismatch
    
    winrandr.c: In function ‘winRandRInit’:
    winrandr.c:218:31: warning: assignment from incompatible pointer type
    
    Fix winRandRScreenSetSize() function signature to match RRScreenSetSizeProcPtr type,
    to align with commit fd9331f6 'Revert "Separate out screen size and screen pixmap
    sizes in RRScreenSizeSet"'
    
    This is fall-out from the late revert of RANDR 1.4 in the 1.10 release cycle, it will
    probably need to be reverted if/when that goes back in again.
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index c581193..596c1ab 100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
@@ -122,8 +122,6 @@ Bool
 winRandRScreenSetSize (ScreenPtr  pScreen,
 		       CARD16	    width,
 		       CARD16	    height,
-		       CARD16       pixWidth,
-		       CARD16       pixHeight,
 		       CARD32	    mmWidth,
 		       CARD32	    mmHeight)
 {
commit aa07d82908c28f4d083c0c55846a5b34f0e1ef31
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Oct 28 09:56:26 2011 -0500

    hw/xwin: Remove an empty #if 0/#endif
    
    Um... yeah
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 8f9917a..d9e71c0 100644
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -640,8 +640,6 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
       SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
 		    0, 0, 0, 0,
 		    SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
-#if 0
-#endif
     }
 #if CYGMULTIWINDOW_DEBUG
   winDebug ("winMWExtWMRestackFrame - done (%08x)\n", (int) pRLWinPriv);
commit d459f42e64f2bafef5124a456d2ad6fa2cd92a7f
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Oct 28 09:52:37 2011 -0500

    hw/xwin: Fix double-free in error path in winQueryRGBBitsAndMasks()
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 1e7cb00..6339010 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -270,7 +270,6 @@ winQueryRGBBitsAndMasks (ScreenPtr pScreen)
   else
     {
       ErrorF ("winQueryRGBBitsAndMasks - winQueryScreenDIBFormat failed\n");
-      free (pbmih);
       fReturn = FALSE;
     }
 
commit cc7dedd6b51a01996ddab10fe8b84e30700d1570
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date:   Fri Oct 28 09:46:45 2011 -0500

    hw/xwin: Fix a memory leak in error path in winInitWM()
    
    Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
    Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 67a58a0..7c40563 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -1201,11 +1201,13 @@ winInitWM (void **ppWMInfo,
   XMsgProcArgPtr	pXMsgArg = (XMsgProcArgPtr) malloc (sizeof(XMsgProcArgRec));
 
   /* Bail if the input parameters are bad */
-  if (pArg == NULL || pWMInfo == NULL)
-    {
-      ErrorF ("winInitWM - malloc failed.\n");
-      return FALSE;
-    }
+  if (pArg == NULL || pWMInfo == NULL || pXMsgArg == NULL) {
+    ErrorF ("winInitWM - malloc failed.\n");
+    free(pArg);
+    free(pWMInfo);
+    free(pXMsgArg);
+    return FALSE;
+  }
   
   /* Zero the allocated memory */
   ZeroMemory (pArg, sizeof (WMProcArgRec));


More information about the xorg-commit mailing list