aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin')
-rwxr-xr-x[-rw-r--r--]xorg-server/hw/xwin/Makefile.am32
-rwxr-xr-x[-rw-r--r--]xorg-server/hw/xwin/glx/.gitignore0
-rw-r--r--xorg-server/hw/xwin/glx/glwindows.h5
-rwxr-xr-xxorg-server/hw/xwin/glx/indirect.c16
-rwxr-xr-x[-rw-r--r--]xorg-server/hw/xwin/glx/winpriv.c0
-rwxr-xr-x[-rw-r--r--]xorg-server/hw/xwin/winclipboardthread.c3
-rwxr-xr-x[-rw-r--r--]xorg-server/hw/xwin/windisplay.c38
-rw-r--r--xorg-server/hw/xwin/windisplay.h34
-rw-r--r--xorg-server/hw/xwin/winmsg.h2
-rwxr-xr-xxorg-server/hw/xwin/winmultiwindowwm.c5
-rwxr-xr-x[-rw-r--r--]xorg-server/hw/xwin/winprefs.c1
-rw-r--r--xorg-server/hw/xwin/winshadddnl.c4
12 files changed, 99 insertions, 41 deletions
diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am
index c53f6098a..326ffa03d 100644..100755
--- a/xorg-server/hw/xwin/Makefile.am
+++ b/xorg-server/hw/xwin/Makefile.am
@@ -15,7 +15,7 @@ if XWIN_GLX_WINDOWS
GLX_DIR = glx
DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS
XWIN_GLX_LIBS = $(top_builddir)/hw/xwin/glx/libXwinGLX.la
-XWIN_GLX_LINK_FLAGS = -lopengl32
+XWIN_GLX_SYS_LIBS = -lopengl32
endif
if XWIN_MULTIWINDOW
@@ -27,7 +27,7 @@ SRCS_MULTIWINDOW = \
propertystore.h \
winSetAppUserModelID.c
DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW
-MULTIWINDOW_LIBS = -lshlwapi -lole32
+MULTIWINDOW_SYS_LIBS = -lshlwapi -lole32
endif
if XWIN_MULTIWINDOWEXTWM
@@ -127,6 +127,7 @@ SRCS = InitInput.c \
winresource.h \
winwindow.h \
windisplay.c \
+ windisplay.h \
XWin.rc \
$(top_srcdir)/mi/miinitext.c \
$(SRCS_CLIPBOARD) \
@@ -151,11 +152,28 @@ XWin_SOURCES = $(SRCS)
AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless
XWIN_SYS_LIBS += -ldxguid
-XWIN_LIBS += $(top_builddir)/pseudoramiX/libPseudoramiX.la \
- $(top_builddir)/Xext/libXextdpmsstubs.la \
- $(top_builddir)/Xi/libXistubs.la
-XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS)
-XWin_LDADD = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
+
+XWIN_LIBS += \
+ $(top_builddir)/pseudoramiX/libPseudoramiX.la \
+ $(top_builddir)/Xext/libXextdpmsstubs.la \
+ $(top_builddir)/Xi/libXistubs.la
+
+XWin_DEPENDENCIES = \
+ $(MULTIWINDOWEXTWM_LIBS) \
+ $(XWIN_GLX_LIBS) \
+ $(XWIN_LIBS) \
+ $(XSERVER_LIBS)
+
+XWin_LDADD = \
+ $(MULTIWINDOWEXTWM_LIBS) \
+ $(XWIN_GLX_LIBS) \
+ $(XWIN_LIBS) \
+ $(XSERVER_LIBS) \
+ $(XWIN_GLX_SYS_LIBS) \
+ $(XSERVER_SYS_LIBS) \
+ $(XWIN_SYS_LIBS) \
+ $(MULTIWINDOW_SYS_LIBS)
+
XWin_LDFLAGS = -mwindows -Wl,--disable-stdcall-fixup $(LD_EXPORT_SYMBOLS_FLAG)
diff --git a/xorg-server/hw/xwin/glx/.gitignore b/xorg-server/hw/xwin/glx/.gitignore
index 70c5283ce..70c5283ce 100644..100755
--- a/xorg-server/hw/xwin/glx/.gitignore
+++ b/xorg-server/hw/xwin/glx/.gitignore
diff --git a/xorg-server/hw/xwin/glx/glwindows.h b/xorg-server/hw/xwin/glx/glwindows.h
index 42adc5b60..1430bef2b 100644
--- a/xorg-server/hw/xwin/glx/glwindows.h
+++ b/xorg-server/hw/xwin/glx/glwindows.h
@@ -28,6 +28,9 @@
* DEALINGS IN THE SOFTWARE.
*/
+#ifndef GLWINDOWS_H
+#define GLWINDOWS_H
+
#include <GL/gl.h>
typedef struct {
@@ -62,3 +65,5 @@ void glWinSetupDispatchTable(void);
#define GLWIN_TRACE_MSG(a, ...)
#define GLWIN_DEBUG_MSG(a, ...)
#endif
+
+#endif
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index b12fa7d68..ada61561b 100755
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -788,9 +788,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
- // Override the GL extensions string set by __glXScreenInit()
- screen->base.GLextensions = strdup(gl_extensions);
-
// Generate the GLX extensions string (overrides that set by __glXScreenInit())
{
unsigned int buffer_size =
@@ -1016,13 +1013,6 @@ glxWinDrawableSwapBuffers(ClientPtr client, __GLXdrawable * base)
("glxWinSwapBuffers on drawable %p, last context %p (native ctx %p)",
base, draw->drawContext, draw->drawContext->ctx);
- /*
- draw->drawContext->base.drawPriv will not be set if the context is not current anymore,
- but if it is, it should point to this drawable....
- */
- assert((draw->drawContext->base.drawPriv == NULL) ||
- (draw->drawContext->base.drawPriv == base));
-
ret = SwapBuffers(draw->drawContext->hDC);
if (!ret) {
@@ -1458,7 +1448,7 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw)
glxWinScreen *winScreen;
int pixelFormat;
- // XXX: which DC are supposed to use???
+ // XXX: which DC are we supposed to use???
ScreenPtr pScreen = pWin->drawable.pScreen;
winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen);
HDC screenDC=pWinScreen->hdcScreen;
@@ -1475,8 +1465,6 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw)
fbConfigToPixelFormatIndex(screenDC, gc->base.config,
GLX_PBUFFER_BIT, winScreen);
if (pixelFormat == 0) {
- ErrorF("wglChoosePixelFormat error: %s\n",
- glxWinErrorMessage());
return;
}
@@ -1937,7 +1925,7 @@ fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode,
SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_EXCHANGE_ARB);
if (mode->swapMethod == GLX_SWAP_COPY_OML)
- SET_ATTR_VALUE(WGL_SWAP_COPY_ARB, TRUE);
+ SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_COPY_ARB);
// XXX: this should probably be the other way around, but that messes up drawableTypeOverride
if (mode->visualRating == GLX_SLOW_VISUAL_EXT)
diff --git a/xorg-server/hw/xwin/glx/winpriv.c b/xorg-server/hw/xwin/glx/winpriv.c
index 1b8ec5a4a..1b8ec5a4a 100644..100755
--- a/xorg-server/hw/xwin/glx/winpriv.c
+++ b/xorg-server/hw/xwin/glx/winpriv.c
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c
index 488a00fcc..735025eb2 100644..100755
--- a/xorg-server/hw/xwin/winclipboardthread.c
+++ b/xorg-server/hw/xwin/winclipboardthread.c
@@ -38,6 +38,7 @@
#include <sys/types.h>
#include <signal.h>
#include "winclipboard.h"
+#include "windisplay.h"
#ifdef __CYGWIN__
#include <errno.h>
#endif
@@ -157,7 +158,7 @@ winClipboardProc(void *pvNotUsed)
* for all screens on the display. That is why there is only
* one clipboard client thread.
*/
- winGetDisplayName(szDisplay,0);
+ winGetDisplayName(szDisplay, 0);
/* Print the display connection string */
winDebug ("winClipboardProc - DISPLAY=%s\n", szDisplay);
diff --git a/xorg-server/hw/xwin/windisplay.c b/xorg-server/hw/xwin/windisplay.c
index db7b2f4d8..d92369850 100644..100755
--- a/xorg-server/hw/xwin/windisplay.c
+++ b/xorg-server/hw/xwin/windisplay.c
@@ -1,4 +1,7 @@
/*
+ * File: windisplay.c
+ * Purpose: Retrieve server display name
+ *
* Copyright (C) Jon TURNEY 2009
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,9 +28,14 @@
#ifdef HAVE_XWIN_CONFIG_H
#include <xwin-config.h>
#endif
-#include "win.h"
-#include <X11/Xwindows.h>
+#include <opaque.h> // for display
+#include "windisplay.h"
+#include "winmsg.h"
+
+#define XSERV_t
+#define TRANS_SERVER
+#include <X11/Xtrans/Xtrans.h>
/*
Generate a display name string referring to the display of this server,
@@ -37,24 +45,20 @@
void
winGetDisplayName(char *szDisplay, unsigned int screen)
{
- if (TransIsListening("local"))
- {
- snprintf(szDisplay, 512, ":%s.%d", display, screen);
+ if (_XSERVTransIsListening("local")) {
+ snprintf(szDisplay, 512, ":%s.%d", display, screen);
}
- else if (TransIsListening("inet"))
- {
- snprintf(szDisplay, 512, "127.0.0.1:%s.%d", display, screen);
+ else if (_XSERVTransIsListening("inet")) {
+ snprintf(szDisplay, 512, "127.0.0.1:%s.%d", display, screen);
}
- else if (TransIsListening("inet6"))
- {
- snprintf(szDisplay, 512, "[::1]:%s.%d", display, screen);
+ else if (_XSERVTransIsListening("inet6")) {
+ snprintf(szDisplay, 512, "[::1]:%s.%d", display, screen);
}
- else
- {
- // this can't happen!
- winDebug ("winGetDisplay: Don't know what to use for DISPLAY\n");
- snprintf(szDisplay, 512, "localhost:%s.%d", display, screen);
+ else {
+ // this can't happen!
+ winDebug("winGetDisplay: Don't know what to use for DISPLAY\n");
+ snprintf(szDisplay, 512, "localhost:%s.%d", display, screen);
}
- winDebug ("winGetDisplay: DISPLAY=%s\n", szDisplay);
+ winDebug("winGetDisplay: DISPLAY=%s\n", szDisplay);
}
diff --git a/xorg-server/hw/xwin/windisplay.h b/xorg-server/hw/xwin/windisplay.h
new file mode 100644
index 000000000..d1d4549bf
--- /dev/null
+++ b/xorg-server/hw/xwin/windisplay.h
@@ -0,0 +1,34 @@
+/*
+ * File: windisplay.h
+ * Purpose: Interface to retrieve server display name
+ *
+ * Copyright (C) Jon TURNEY 2009
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef WINDISPLAY_H
+#define WINDISPLAY_H
+
+void
+winGetDisplayName(char *szDisplay, unsigned int screen);
+
+#endif /* !WINDISPLAY_H */
diff --git a/xorg-server/hw/xwin/winmsg.h b/xorg-server/hw/xwin/winmsg.h
index beb6683ed..b3c5d7054 100644
--- a/xorg-server/hw/xwin/winmsg.h
+++ b/xorg-server/hw/xwin/winmsg.h
@@ -30,6 +30,8 @@
* Authors: Alexander Gottwald
*/
+#include <X11/Xwindows.h>
+
/*
* Function prototypes
*/
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 45aa93016..d35f048e3 100755
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -65,6 +65,7 @@ typedef int pid_t;
#include "windowstr.h"
#include "winmultiwindowclass.h"
#include "winglobals.h"
+#include "windisplay.h"
#ifdef XWIN_MULTIWINDOWEXTWM
#define _WINDOWSWM_SERVER_
@@ -983,7 +984,7 @@ winMultiWindowXMsgProc(void *pArg)
}
/* Setup the display connection string x */
- winGetDisplayName(pszDisplay, (int)pProcArg->dwScreen);
+ winGetDisplayName(pszDisplay, (int) pProcArg->dwScreen);
/* Print the display connection string */
winDebug("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay);
@@ -1382,7 +1383,7 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
}
/* Setup the display connection string x */
- winGetDisplayName(pszDisplay, (int)pProcArg->dwScreen);
+ winGetDisplayName(pszDisplay, (int) pProcArg->dwScreen);
/* Print the display connection string */
winDebug("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay);
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index 3d21066f4..533230ed0 100644..100755
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -44,6 +44,7 @@
#include <shellapi.h>
#include "winprefs.h"
+#include "windisplay.h"
#include "winmultiwindowclass.h"
/* Where will the custom menu commands start counting from? */
diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c
index 047482e09..c7db77bac 100644
--- a/xorg-server/hw/xwin/winshadddnl.c
+++ b/xorg-server/hw/xwin/winshadddnl.c
@@ -983,6 +983,10 @@ winRedrawScreenShadowDDNL(ScreenPtr pScreen)
RECT rcSrc, rcDest;
POINT ptOrigin;
+ /* Return immediately if we didn't get needed surfaces */
+ if (!pScreenPriv->pddsPrimary4 || !pScreenPriv->pddsShadow4)
+ return;
+
/* Get the origin of the window in the screen coords */
ptOrigin.x = pScreenInfo->dwXOffset;
ptOrigin.y = pScreenInfo->dwYOffset;