xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Nov 5 08:42:43 PST 2012


 hw/xwin/Makefile.am        |    2 +
 hw/xwin/winms.h            |    4 ++
 hw/xwin/winmultiwindowwm.c |    2 -
 hw/xwin/winshaddd.c        |   18 ------------
 hw/xwin/winshadddnl.c      |   64 ---------------------------------------------
 hw/xwin/winwindow.h        |    9 ------
 6 files changed, 7 insertions(+), 92 deletions(-)

New commits:
commit 04f980ead5e9af066143a921e0a0e98f26f28ee5
Merge: a194630... a4941ce...
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Nov 5 08:45:21 2012 -0800

    Merge remote-tracking branch 'jturney/mingw-w64-w32api'

commit a4941ce4961f254ac31e2cef6dd0863866246bab
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Tue Aug 21 15:31:16 2012 +0100

    hw/xwin: Wrap 'Status' when including ddraw.h
    
    Status is #defined as an alias for a type in xkbsrv.h, which conflicts with it's
    use as a parameter name in rpcdce.h
    
    This fixes compilation with MinGW-w64 w32api headers
    
    (The MinGW-w64 w32api headers actually provide a ddraw.h, so this fix tries to
    do things in a way which will still work if our private copy of ddraw.h is
    eventually removed)
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by:  Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winms.h b/hw/xwin/winms.h
index 4355bae..5282fc9 100644
--- a/hw/xwin/winms.h
+++ b/hw/xwin/winms.h
@@ -42,7 +42,11 @@
 #include <X11/Xwindows.h>
 #include <windowsx.h>
 
+#pragma push_macro("Status")
+#undef Status
+#define Status wStatus
 #include "ddraw.h"
+#pragma pop_macro("Status")
 
 #undef CreateWindow
 
commit 57bbf6e2aead6cce76a9f5d43829b58868a26059
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Mon Oct 29 14:35:45 2012 +0000

    hw/xwin: Remove pointless winFinishCreateWindowsWindowDDNL()
    
    Remove pointless winFinishCreateWindowsWindowDDNL() and the useless DirectDraw
    surface pointers in the window privates
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by:  Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index ac9d579..42925e3 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -55,8 +55,6 @@
 #include <X11/Xwindows.h>
 
 /* Local headers */
-#include "objbase.h"
-#include "ddraw.h"
 #include "winwindow.h"
 #include "winprefs.h"
 #include "window.h"
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 302ba6c..e730615 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -508,50 +508,6 @@ winFreeFBShadowDDNL(ScreenPtr pScreen)
     pScreenInfo->pfb = NULL;
 }
 
-#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
-/*
- * Create a DirectDraw surface for the new multi-window window
- */
-
-static
-    Bool
-winFinishCreateWindowsWindowDDNL(WindowPtr pWin)
-{
-    winWindowPriv(pWin);
-    winPrivScreenPtr pScreenPriv = pWinPriv->pScreenPriv;
-    HRESULT ddrval = DD_OK;
-    DDSURFACEDESC2 ddsd;
-    int iWidth, iHeight;
-    int iX, iY;
-
-    winDebug("winFinishCreateWindowsWindowDDNL!\n\n");
-
-    iX = pWin->drawable.x + GetSystemMetrics(SM_XVIRTUALSCREEN);
-    iY = pWin->drawable.y + GetSystemMetrics(SM_YVIRTUALSCREEN);
-
-    iWidth = pWin->drawable.width;
-    iHeight = pWin->drawable.height;
-
-    /* Describe the primary surface */
-    ZeroMemory(&ddsd, sizeof(ddsd));
-    ddsd.dwSize = sizeof(ddsd);
-    ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
-    ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
-    ddsd.dwHeight = iHeight;
-    ddsd.dwWidth = iWidth;
-
-    /* Create the primary surface */
-    ddrval = IDirectDraw4_CreateSurface(pScreenPriv->pdd4,
-                                        &ddsd, &pWinPriv->pddsPrimary4, NULL);
-    if (FAILED(ddrval)) {
-        ErrorF("winFinishCreateWindowsWindowDDNL - Could not create primary "
-               "surface: %08x\n", (unsigned int) ddrval);
-        return FALSE;
-    }
-    return TRUE;
-}
-#endif
-
 /*
  * Transfer the damaged regions of the shadow framebuffer to the display.
  */
@@ -1260,7 +1216,7 @@ winSetEngineFunctionsShadowDDNL(ScreenPtr pScreen)
     pScreenPriv->pwinReleasePrimarySurface = winReleasePrimarySurfaceShadowDDNL;
 #ifdef XWIN_MULTIWINDOW
     pScreenPriv->pwinFinishCreateWindowsWindow
-        = winFinishCreateWindowsWindowDDNL;
+        = (winFinishCreateWindowsWindowProcPtr) (void (*)(void)) NoopDDA;
 #endif
 
     return TRUE;
diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h
index a5919ee..49a720a 100644
--- a/hw/xwin/winwindow.h
+++ b/hw/xwin/winwindow.h
@@ -81,15 +81,6 @@ typedef struct {
 #ifdef XWIN_GLX_WINDOWS
     Bool fWglUsed;
 #endif
-
-    /* Privates used by primary fb DirectDraw server */
-    LPDDSURFACEDESC pddsdPrimary;
-
-    /* Privates used by shadow fb DirectDraw Nonlocking server */
-    LPDIRECTDRAWSURFACE4 pddsPrimary4;
-
-    /* Privates used by both shadow fb DirectDraw servers */
-    LPDIRECTDRAWCLIPPER pddcPrimary;
 } winPrivWinRec, *winPrivWinPtr;
 
 #ifdef XWIN_MULTIWINDOW
commit 5bc4c53d23d02d3d7297a8f00a92b6e4d5e0d6fe
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Tue Sep 4 17:28:16 2012 +0100

    hw/xwin: Link with libdxguid rather than defining the DirectX GUIDs ourselves
    
    Decruftify by linking with libdxguid rather than defining the DirectX GUIDs
    ourselves. This fixes compilation with MinGW-w64 w32api headers, which do not
    provide GUID_SECT (which only ever did anything for gcc prior to 2.95, anyhow)
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by:  Colin Harrison <colin.harrison at virgin.net>

diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 99dc556..3fcaf9d 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -147,6 +147,8 @@ XWin_SOURCES = $(SRCS)
 
 INCLUDES = -I$(top_srcdir)/miext/rootless
 
+XWIN_SYS_LIBS += -ldxguid
+
 XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS)
 XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
 XWin_LDFLAGS = -mwindows -static
diff --git a/hw/xwin/winshaddd.c b/hw/xwin/winshaddd.c
index 4c77cc0..3afc57c 100644
--- a/hw/xwin/winshaddd.c
+++ b/hw/xwin/winshaddd.c
@@ -37,24 +37,6 @@
 #include "win.h"
 
 /*
- * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
- * so we have to redefine it here.
- */
-#ifdef DEFINE_GUID
-#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#endif                          /* DEFINE_GUID */
-
-/*
- * FIXME: Headers are broken, IID_IDirectDraw2 has to be defined
- * here manually.  Should be handled by ddraw.h
- */
-#ifndef IID_IDirectDraw2
-DEFINE_GUID(IID_IDirectDraw2, 0xB3A6F3E0, 0x2B43, 0x11CF, 0xA2, 0xDE, 0x00,
-            0xAA, 0x00, 0xB9, 0x33, 0x56);
-#endif                          /* IID_IDirectDraw2 */
-
-/*
  * Local prototypes
  */
 
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index c087975..302ba6c 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -36,24 +36,6 @@
 #endif
 #include "win.h"
 
-/*
- * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
- * so we have to redefine it here.
- */
-#ifdef DEFINE_GUID
-#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#endif                          /* DEFINE_GUID */
-
-/*
- * FIXME: Headers are broken, IID_IDirectDraw4 has to be defined
- * here manually.  Should be handled by ddraw.h
- */
-#ifndef IID_IDirectDraw4
-DEFINE_GUID(IID_IDirectDraw4, 0x9c59509a, 0x39bd, 0x11d1, 0x8c, 0x4a, 0x00,
-            0xc0, 0x4f, 0xd9, 0x30, 0xc5);
-#endif                          /* IID_IDirectDraw4 */
-
 #define FAIL_MSG_MAX_BLT	10
 
 /*


More information about the xorg-commit mailing list