aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-29 16:09:45 +0200
committermarha <marha@users.sourceforge.net>2012-06-29 16:09:45 +0200
commit8e69b2fa996acf8fa1d218b67a203eb67e280899 (patch)
tree1caebab7024f5b62dc57e49a69a20ef10cb8210f /xorg-server
parentcd103d3f4d59ac4f09cfcf126e572ddb0b9d4628 (diff)
parentf6d1847eef027266daa0f75ee92ceb09698b2761 (diff)
downloadvcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.tar.gz
vcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.tar.bz2
vcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/hw/xwin/glx/gen_gl_wrappers.py xorg-server/hw/xwin/glx/indirect.c
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/composite/compalloc.c4
-rw-r--r--xorg-server/composite/compint.h2
-rw-r--r--xorg-server/composite/compwindow.c26
-rw-r--r--xorg-server/configure.ac3
-rw-r--r--xorg-server/dix/getevents.c40
-rw-r--r--xorg-server/dix/window.c13
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c8
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Rotate.c24
-rw-r--r--xorg-server/hw/xwin/glx/gen_gl_wrappers.py4
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c68
-rw-r--r--xorg-server/include/window.h1
-rw-r--r--xorg-server/include/xkbsrv.h5
-rw-r--r--xorg-server/mi/midispcur.c18
-rw-r--r--xorg-server/os/connection.c1
-rw-r--r--xorg-server/randr/randr.c3
-rw-r--r--xorg-server/randr/rrcrtc.c10
-rw-r--r--xorg-server/randr/rrinfo.c7
-rw-r--r--xorg-server/randr/rrmode.c4
-rw-r--r--xorg-server/randr/rroutput.c11
-rw-r--r--xorg-server/randr/rrscreen.c3
-rw-r--r--xorg-server/render/picture.c8
-rw-r--r--xorg-server/render/picturestr.h3
-rw-r--r--xorg-server/test/.gitignore1
-rw-r--r--xorg-server/test/Makefile.am2
-rw-r--r--xorg-server/test/xi2/Makefile.am2
-rw-r--r--xorg-server/xkeyboard-config/symbols/keypad2
26 files changed, 140 insertions, 133 deletions
diff --git a/xorg-server/composite/compalloc.c b/xorg-server/composite/compalloc.c
index f79f5f96c..e684c4360 100644
--- a/xorg-server/composite/compalloc.c
+++ b/xorg-server/composite/compalloc.c
@@ -560,8 +560,8 @@ compNewPixmap(WindowPtr pWin, int x, int y, int w, int h)
}
}
else {
- PictFormatPtr pSrcFormat = compWindowFormat(pParent);
- PictFormatPtr pDstFormat = compWindowFormat(pWin);
+ PictFormatPtr pSrcFormat = PictureWindowFormat(pParent);
+ PictFormatPtr pDstFormat = PictureWindowFormat(pWin);
XID inferiors = IncludeInferiors;
int error;
diff --git a/xorg-server/composite/compint.h b/xorg-server/composite/compint.h
index 9e2713e93..30b724e3e 100644
--- a/xorg-server/composite/compint.h
+++ b/xorg-server/composite/compint.h
@@ -272,8 +272,6 @@ void
#define compCheckTree(s)
#endif
-PictFormatPtr compWindowFormat(WindowPtr pWin);
-
void
compSetPixmap(WindowPtr pWin, PixmapPtr pPixmap);
diff --git a/xorg-server/composite/compwindow.c b/xorg-server/composite/compwindow.c
index 6eb624b11..d0bcd183f 100644
--- a/xorg-server/composite/compwindow.c
+++ b/xorg-server/composite/compwindow.c
@@ -631,28 +631,6 @@ compGetRedirectBorderClip(WindowPtr pWin)
return &cw->borderClip;
}
-static VisualPtr
-compGetWindowVisual(WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- VisualID vid = wVisual(pWin);
- int i;
-
- for (i = 0; i < pScreen->numVisuals; i++)
- if (pScreen->visuals[i].vid == vid)
- return &pScreen->visuals[i];
- return 0;
-}
-
-PictFormatPtr
-compWindowFormat(WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- return PictureMatchVisual(pScreen, pWin->drawable.depth,
- compGetWindowVisual(pWin));
-}
-
static void
compWindowUpdateAutomatic(WindowPtr pWin)
{
@@ -660,8 +638,8 @@ compWindowUpdateAutomatic(WindowPtr pWin)
ScreenPtr pScreen = pWin->drawable.pScreen;
WindowPtr pParent = pWin->parent;
PixmapPtr pSrcPixmap = (*pScreen->GetWindowPixmap) (pWin);
- PictFormatPtr pSrcFormat = compWindowFormat(pWin);
- PictFormatPtr pDstFormat = compWindowFormat(pWin->parent);
+ PictFormatPtr pSrcFormat = PictureWindowFormat(pWin);
+ PictFormatPtr pDstFormat = PictureWindowFormat(pWin->parent);
int error;
RegionPtr pRegion = DamageRegion(cw->damage);
PicturePtr pSrcPicture = CreatePicture(0, &pSrcPixmap->drawable,
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index fb3d12092..7576dae1d 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -1879,8 +1879,9 @@ if test "x$XWIN" = xyes; then
XWIN_SYS_LIBS=-lws2_32
;;
esac
+
XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
- XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS"
+ XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS $GLX_SYS_LIBS"
AC_SUBST(XWIN_LIBS)
AC_SUBST(XWIN_SERVER_NAME)
AC_SUBST(XWIN_SYS_LIBS)
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index e1b26783f..9d9214b6d 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -35,6 +35,7 @@
#include <X11/keysym.h>
#include <X11/Xproto.h>
#include <math.h>
+#include <limits.h>
#include "misc.h"
#include "resource.h"
@@ -771,6 +772,29 @@ clipAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
}
}
+static void
+add_to_scroll_valuator(DeviceIntPtr dev, ValuatorMask *mask, int valuator, double value)
+{
+ double v;
+
+ if (!valuator_mask_fetch_double(mask, valuator, &v))
+ return;
+
+ /* protect against scrolling overflow. INT_MAX for double, because
+ * we'll eventually write this as 32.32 fixed point */
+ if ((value > 0 && v > INT_MAX - value) || (value < 0 && v < INT_MIN - value)) {
+ v = 0;
+
+ /* reset last.scroll to avoid a button storm */
+ valuator_mask_set_double(dev->last.scroll, valuator, 0);
+ }
+ else
+ v += value;
+
+ valuator_mask_set_double(mask, valuator, v);
+}
+
+
/**
* Move the device's pointer by the values given in @valuators.
*
@@ -789,13 +813,17 @@ moveRelative(DeviceIntPtr dev, ValuatorMask *mask)
if (!valuator_mask_isset(mask, i))
continue;
- val += valuator_mask_get_double(mask, i);
+
+ add_to_scroll_valuator(dev, mask, i, val);
+
/* x & y need to go over the limits to cross screens if the SD
* isn't currently attached; otherwise, clip to screen bounds. */
if (valuator_get_mode(dev, i) == Absolute &&
- ((i != 0 && i != 1) || clip_xy))
+ ((i != 0 && i != 1) || clip_xy)) {
+ val = valuator_mask_get_double(mask, i);
clipAxis(dev, i, &val);
- valuator_mask_set_double(mask, i, val);
+ valuator_mask_set_double(mask, i, val);
+ }
}
}
@@ -1527,6 +1555,7 @@ emulate_scroll_button_events(InternalEvent *events,
return num_events;
}
+
/**
* Generate a complete series of InternalEvents (filled into the EventList)
* representing pointer motion, or button presses. If the device is a slave
@@ -1581,7 +1610,7 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
* necessary. This only needs to cater for the XIScrollFlagPreferred
* axis (if more than one scrolling axis is present) */
if (type == ButtonPress) {
- double val, adj;
+ double adj;
int axis;
int h_scroll_axis = -1;
int v_scroll_axis = -1;
@@ -1617,8 +1646,7 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
if (adj != 0.0 && axis != -1) {
adj *= pDev->valuator->axes[axis].scroll.increment;
- val = valuator_mask_get_double(&mask, axis) + adj;
- valuator_mask_set_double(&mask, axis, val);
+ add_to_scroll_valuator(pDev, &mask, axis, adj);
type = MotionNotify;
buttons = 0;
flags |= POINTER_EMULATED;
diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c
index 98f5604c9..5cc3a502d 100644
--- a/xorg-server/dix/window.c
+++ b/xorg-server/dix/window.c
@@ -3660,3 +3660,16 @@ SetRootClip(ScreenPtr pScreen, Bool enable)
WindowsRestructured();
FlushAllOutput();
}
+
+VisualPtr
+WindowGetVisual(WindowPtr pWin)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ VisualID vid = wVisual(pWin);
+ int i;
+
+ for (i = 0; i < pScreen->numVisuals; i++)
+ if (pScreen->visuals[i].vid == vid)
+ return &pScreen->visuals[i];
+ return 0;
+}
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index d0f17896d..d3b3c73f8 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -1111,14 +1111,14 @@ DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd,
return TRUE;
}
-static Bool
+static int
DRI2AuthMagic (ScreenPtr pScreen, uint32_t magic)
{
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
- if (ds == NULL || (*ds->LegacyAuthMagic) (ds->fd, magic))
- return FALSE;
+ if (ds == NULL)
+ return -EINVAL;
- return TRUE;
+ return (*ds->LegacyAuthMagic) (ds->fd, magic);
}
Bool
diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c
index 6a661e195..31e03727e 100644
--- a/xorg-server/hw/xfree86/modes/xf86Rotate.c
+++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c
@@ -46,28 +46,6 @@
/* borrowed from composite extension, move to Render and publish? */
-static VisualPtr
-compGetWindowVisual(WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- VisualID vid = wVisual(pWin);
- int i;
-
- for (i = 0; i < pScreen->numVisuals; i++)
- if (pScreen->visuals[i].vid == vid)
- return &pScreen->visuals[i];
- return 0;
-}
-
-static PictFormatPtr
-compWindowFormat(WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- return PictureMatchVisual(pScreen, pWin->drawable.depth,
- compGetWindowVisual(pWin));
-}
-
#define F(x) IntToxFixed(x)
#define toF(x) ((float) (x) / 65536.0f)
@@ -79,7 +57,7 @@ xf86RotateCrtcRedisplay(xf86CrtcPtr crtc, RegionPtr region)
ScreenPtr screen = scrn->pScreen;
WindowPtr root = screen->root;
PixmapPtr dst_pixmap = crtc->rotatedPixmap;
- PictFormatPtr format = compWindowFormat(screen->root);
+ PictFormatPtr format = PictureWindowFormat(screen->root);
int error;
PicturePtr src, dst;
int n = RegionNumRects(region);
diff --git a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
index d4beee230..d45e7aea9 100644
--- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
+++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
@@ -224,6 +224,8 @@ for w in sorted(wrappers.keys()) :
if l[2] == 'in' :
if l[3] == 'array' :
arg = 'const ' + typemap[l[1]] + ' *' + l[0]
+ elif l[3] == 'reference' :
+ arg = 'const ' + typemap[l[1]] + ' *' + l[0]
else :
arg = typemap[l[1]] + ' ' + l[0]
elif l[2] == 'out' :
@@ -318,7 +320,7 @@ if dispatchheader :
for d in sorted(dispatch.keys()) :
if wrappers.has_key(d) :
- print ' SET_'+ d + '(disp, (void *)' + prefix + d + 'Wrapper);'
+ print ' SET_'+ d + '(disp, (void *)' + prefix + d + 'Wrapper);'
else :
print '#pragma message("No wrapper for ' + prefix + d + ' !")'
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index 45a6294b5..9dd9660ce 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -438,8 +438,7 @@ static __GLXcontext *glxWinCreateContext(__GLXscreen * screen,
__GLXconfig * modes,
__GLXcontext * baseShareContext,
unsigned num_attribs,
- const uint32_t *attribs,
- int *error);
+ const uint32_t * attribs, int *error);
static __GLXdrawable *glxWinCreateDrawable(ClientPtr client,
__GLXscreen * screen,
DrawablePtr pDraw,
@@ -527,7 +526,7 @@ static void
glxLogExtensions(const char *prefix, const char *extensions)
{
int length = 0;
- char *strl;
+ const char *strl;
char *str = strdup(extensions);
if (str == NULL) {
@@ -536,15 +535,11 @@ glxLogExtensions(const char *prefix, const char *extensions)
}
strl = strtok(str, " ");
- if (!strl)
- {
- winDebug("%s", prefix);
- }
- else
- {
- winDebug("%s%s", prefix, strl);
- length = strlen(prefix) + strlen(strl);
- }
+ if (strl == NULL)
+ strl = "";
+ winDebug("%s%s", prefix, strl);
+
+ length = strlen(prefix) + strlen(strl);
while (1) {
strl = strtok(NULL, " ");
@@ -576,6 +571,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
{
glxWinScreen *screen;
const char *gl_extensions;
+ const char *gl_renderer;
const char *wgl_extensions;
HWND hwnd;
HDC hdc;
@@ -601,18 +597,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
if (NULL == screen)
return NULL;
- /* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */
- screen->RealizeWindow = pScreen->RealizeWindow;
- pScreen->RealizeWindow = glxWinRealizeWindow;
- screen->UnrealizeWindow = pScreen->UnrealizeWindow;
- pScreen->UnrealizeWindow = glxWinUnrealizeWindow;
- screen->CopyWindow = pScreen->CopyWindow;
- pScreen->CopyWindow = glxWinCopyWindow;
- screen->PositionWindow = pScreen->PositionWindow;
- pScreen->PositionWindow = glxWinPositionWindow;
- screen->DestroyWindow = pScreen->DestroyWindow;
- pScreen->DestroyWindow = glxWinDestroyWindow;
-
/* Dump out some useful information about the native renderer */
// create window class
@@ -665,7 +649,8 @@ glxWinScreenProbe(ScreenPtr pScreen)
winDebug("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION));
winDebug("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR));
- winDebug("GL_RENDERER: %s\n", glGetStringWrapperNonstatic(GL_RENDERER));
+ gl_renderer = (const char *) glGetStringWrapperNonstatic(GL_RENDERER);
+ winDebug("GL_RENDERER: %s\n", gl_renderer);
gl_extensions = (const char *) glGetStringWrapperNonstatic(GL_EXTENSIONS);
glxLogExtensions("GL_EXTENSIONS: ", gl_extensions);
wgl_extensions = wglGetExtensionsStringARBWrapper(hdc);
@@ -673,6 +658,13 @@ glxWinScreenProbe(ScreenPtr pScreen)
wgl_extensions = "";
glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions);
+ if (strcasecmp(gl_renderer, "GDI Generic") == 0) {
+ free(screen);
+ LogMessage(X_ERROR,
+ "AIGLX: Won't use generic native renderer as it is not accelerated\n");
+ return NULL;
+ }
+
// Can you see the problem here? The extensions string is DC specific
// Different DCs for windows on a multimonitor system driven by multiple cards
// might have completely different capabilities. Of course, good luck getting
@@ -790,11 +782,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
-#ifdef _DEBUG
- // dump out fbConfigs now fbConfigIds and visualIDs have been assigned
- fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs);
-#endif
-
// Override the GL extensions string set by __glXScreenInit()
screen->base.GLextensions = strdup(gl_extensions);
@@ -837,6 +824,23 @@ glxWinScreenProbe(ScreenPtr pScreen)
ReleaseDC(hwnd, hdc);
DestroyWindow(hwnd);
+#ifdef _DEBUG
+ // dump out fbConfigs now fbConfigIds and visualIDs have been assigned
+ fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs);
+#endif
+
+ /* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */
+ screen->RealizeWindow = pScreen->RealizeWindow;
+ pScreen->RealizeWindow = glxWinRealizeWindow;
+ screen->UnrealizeWindow = pScreen->UnrealizeWindow;
+ pScreen->UnrealizeWindow = glxWinUnrealizeWindow;
+ screen->CopyWindow = pScreen->CopyWindow;
+ pScreen->CopyWindow = glxWinCopyWindow;
+ screen->PositionWindow = pScreen->PositionWindow;
+ pScreen->PositionWindow = glxWinPositionWindow;
+ screen->DestroyWindow = pScreen->DestroyWindow;
+ pScreen->DestroyWindow = glxWinDestroyWindow;
+
return &screen->base;
}
@@ -1772,9 +1776,7 @@ glxWinContextDestroy(__GLXcontext * base)
static __GLXcontext *
glxWinCreateContext(__GLXscreen * screen,
__GLXconfig * modes, __GLXcontext * baseShareContext,
- unsigned num_attribs,
- const uint32_t *attribs,
- int *error)
+ unsigned num_attribs, const uint32_t * attribs, int *error)
{
__GLXWinContext *context;
__GLXWinContext *shareContext = (__GLXWinContext *) baseShareContext;
diff --git a/xorg-server/include/window.h b/xorg-server/include/window.h
index 64c56aeb3..7842b4d58 100644
--- a/xorg-server/include/window.h
+++ b/xorg-server/include/window.h
@@ -229,4 +229,5 @@ extern _X_EXPORT void EnableMapUnmapEvents(WindowPtr /* pWin */ );
extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
extern _X_EXPORT void PrintWindowTree(void);
+extern _X_EXPORT VisualPtr WindowGetVisual(WindowPtr /*pWin*/);
#endif /* WINDOW_H */
diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h
index a19c8fb29..d58478543 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/include/xkbsrv.h
@@ -301,6 +301,11 @@ extern _X_EXPORT const char *XkbBinDirectory;
extern _X_EXPORT CARD32 xkbDebugFlags;
#define _XkbLibError(c,l,d) /* Epoch fail */
+
+/* "a" is a "unique" numeric identifier that just defines which error
+ * code statement it is. _XkbErrCode2(4, foo) means "this is the 4th error
+ * statement in this function". lovely.
+ */
#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
diff --git a/xorg-server/mi/midispcur.c b/xorg-server/mi/midispcur.c
index 9ee824283..df141cdc7 100644
--- a/xorg-server/mi/midispcur.c
+++ b/xorg-server/mi/midispcur.c
@@ -151,19 +151,6 @@ miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
#ifdef ARGB_CURSOR
#define EnsurePicture(picture,draw,win) (picture || miDCMakePicture(&picture,draw,win))
-static VisualPtr
-miDCGetWindowVisual(WindowPtr pWin)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- VisualID vid = wVisual(pWin);
- int i;
-
- for (i = 0; i < pScreen->numVisuals; i++)
- if (pScreen->visuals[i].vid == vid)
- return &pScreen->visuals[i];
- return 0;
-}
-
static PicturePtr
miDCMakePicture(PicturePtr * ppPicture, DrawablePtr pDraw, WindowPtr pWin)
{
@@ -174,10 +161,7 @@ miDCMakePicture(PicturePtr * ppPicture, DrawablePtr pDraw, WindowPtr pWin)
PicturePtr pPicture;
int error;
- pVisual = miDCGetWindowVisual(pWin);
- if (!pVisual)
- return 0;
- pFormat = PictureMatchVisual(pScreen, pDraw->depth, pVisual);
+ pFormat = PictureWindowFormat(pWin);
if (!pFormat)
return 0;
pPicture = CreatePicture(0, pDraw, pFormat,
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index ddda86a79..50ed4ae69 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -380,6 +380,7 @@ NotifyParentProcess(void)
#if !defined(WIN32)
if (dynamic_display[0]) {
write(displayfd, dynamic_display, strlen(dynamic_display));
+ write(displayfd, "\n", 1);
close(displayfd);
}
if (RunFromSmartParent) {
diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c
index 4d4298af9..103da48d7 100644
--- a/xorg-server/randr/randr.c
+++ b/xorg-server/randr/randr.c
@@ -446,6 +446,9 @@ RRFirstOutput(ScreenPtr pScreen)
RROutputPtr output;
int i, j;
+ if (!pScrPriv)
+ return NULL;
+
if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
return pScrPriv->primaryOutput;
diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c
index 36caa5822..0c596dd4c 100644
--- a/xorg-server/randr/rrcrtc.c
+++ b/xorg-server/randr/rrcrtc.c
@@ -825,10 +825,9 @@ ProcRRSetCrtcConfig(ClientPtr client)
int numOutputs;
RROutputPtr *outputs = NULL;
RROutput *outputIds;
- TimeStamp configTime;
TimeStamp time;
Rotation rotation;
- int rc, i, j;
+ int ret, i, j;
REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
numOutputs = (stuff->length - bytes_to_int32(SIZEOF(xRRSetCrtcConfigReq)));
@@ -855,11 +854,11 @@ ProcRRSetCrtcConfig(ClientPtr client)
outputIds = (RROutput *) (stuff + 1);
for (i = 0; i < numOutputs; i++) {
- rc = dixLookupResourceByType((pointer *) (outputs + i), outputIds[i],
+ ret = dixLookupResourceByType((pointer *) (outputs + i), outputIds[i],
RROutputType, client, DixSetAttrAccess);
- if (rc != Success) {
+ if (ret != Success) {
free(outputs);
- return rc;
+ return ret;
}
/* validate crtc for this output */
for (j = 0; j < outputs[i]->numCrtcs; j++)
@@ -904,7 +903,6 @@ ProcRRSetCrtcConfig(ClientPtr client)
pScrPriv = rrGetScrPriv(pScreen);
time = ClientTimeToServerTime(stuff->timestamp);
- configTime = ClientTimeToServerTime(stuff->configTimestamp);
if (!pScrPriv) {
time = currentTime;
diff --git a/xorg-server/randr/rrinfo.c b/xorg-server/randr/rrinfo.c
index 114ec3471..1408d6f64 100644
--- a/xorg-server/randr/rrinfo.c
+++ b/xorg-server/randr/rrinfo.c
@@ -82,6 +82,7 @@ RRScanOldConfig(ScreenPtr pScreen, Rotation rotations)
int i;
CARD16 minWidth = MAXSHORT, minHeight = MAXSHORT;
CARD16 maxWidth = 0, maxHeight = 0;
+ CARD16 width, height;
/*
* First time through, create a crtc and output and hook
@@ -141,11 +142,11 @@ RRScanOldConfig(ScreenPtr pScreen, Rotation rotations)
/* find size bounds */
for (i = 0; i < output->numModes + output->numUserModes; i++) {
- RRModePtr mode = (i < output->numModes ?
+ mode = (i < output->numModes ?
output->modes[i] :
output->userModes[i - output->numModes]);
- CARD16 width = mode->mode.width;
- CARD16 height = mode->mode.height;
+ width = mode->mode.width;
+ height = mode->mode.height;
if (width < minWidth)
minWidth = width;
diff --git a/xorg-server/randr/rrmode.c b/xorg-server/randr/rrmode.c
index b637c06b9..49a45c7f6 100644
--- a/xorg-server/randr/rrmode.c
+++ b/xorg-server/randr/rrmode.c
@@ -173,7 +173,7 @@ RRModesForScreen(ScreenPtr pScreen, int *num_ret)
*/
for (o = 0; o < pScrPriv->numOutputs; o++) {
RROutputPtr output = pScrPriv->outputs[o];
- int m, n;
+ int n;
for (m = 0; m < output->numModes + output->numUserModes; m++) {
RRModePtr mode = (m < output->numModes ?
@@ -285,7 +285,6 @@ ProcRRCreateMode(ClientPtr client)
xRRCreateModeReply rep = { 0 };
WindowPtr pWin;
ScreenPtr pScreen;
- rrScrPrivPtr pScrPriv;
xRRModeInfo *modeInfo;
long units_after;
char *name;
@@ -298,7 +297,6 @@ ProcRRCreateMode(ClientPtr client)
return rc;
pScreen = pWin->drawable.pScreen;
- pScrPriv = rrGetScrPriv(pScreen);
modeInfo = &stuff->modeInfo;
name = (char *) (stuff + 1);
diff --git a/xorg-server/randr/rroutput.c b/xorg-server/randr/rroutput.c
index 0890c55b5..fbd0e32b3 100644
--- a/xorg-server/randr/rroutput.c
+++ b/xorg-server/randr/rroutput.c
@@ -528,13 +528,13 @@ ProcRRSetOutputPrimary(ClientPtr client)
RROutputPtr output = NULL;
WindowPtr pWin;
rrScrPrivPtr pScrPriv;
- int rc;
+ int ret;
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
- if (rc != Success)
- return rc;
+ ret = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (ret != Success)
+ return ret;
if (stuff->output) {
VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess);
@@ -546,7 +546,8 @@ ProcRRSetOutputPrimary(ClientPtr client)
}
pScrPriv = rrGetScrPriv(pWin->drawable.pScreen);
- RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
+ if (pScrPriv)
+ RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
return Success;
}
diff --git a/xorg-server/randr/rrscreen.c b/xorg-server/randr/rrscreen.c
index f570afaf4..55110e088 100644
--- a/xorg-server/randr/rrscreen.c
+++ b/xorg-server/randr/rrscreen.c
@@ -248,6 +248,9 @@ ProcRRSetScreenSize(ClientPtr client)
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);
+ if (!pScrPriv)
+ return BadMatch;
+
if (stuff->width < pScrPriv->minWidth || pScrPriv->maxWidth < stuff->width) {
client->errorValue = stuff->width;
return BadValue;
diff --git a/xorg-server/render/picture.c b/xorg-server/render/picture.c
index 788785354..ebbfa29e9 100644
--- a/xorg-server/render/picture.c
+++ b/xorg-server/render/picture.c
@@ -50,6 +50,14 @@ RESTYPE PictFormatType;
RESTYPE GlyphSetType;
int PictureCmapPolicy = PictureCmapPolicyDefault;
+PictFormatPtr
+PictureWindowFormat(WindowPtr pWindow)
+{
+ ScreenPtr pScreen = pWindow->drawable.pScreen;
+ return PictureMatchVisual(pScreen, pWindow->drawable.depth,
+ WindowGetVisual(pWindow));
+}
+
Bool
PictureDestroyWindow(WindowPtr pWindow)
{
diff --git a/xorg-server/render/picturestr.h b/xorg-server/render/picturestr.h
index 6da56563d..1cda88a80 100644
--- a/xorg-server/render/picturestr.h
+++ b/xorg-server/render/picturestr.h
@@ -377,6 +377,9 @@ extern _X_EXPORT RESTYPE GlyphSetType;
} \
} \
+extern _X_EXPORT PictFormatPtr
+ PictureWindowFormat(WindowPtr pWindow);
+
extern _X_EXPORT Bool
PictureDestroyWindow(WindowPtr pWindow);
diff --git a/xorg-server/test/.gitignore b/xorg-server/test/.gitignore
index 5d4fdfa99..23d4c8f4f 100644
--- a/xorg-server/test/.gitignore
+++ b/xorg-server/test/.gitignore
@@ -1,4 +1,5 @@
fixes
+hashtabletest
input
list
misc
diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am
index b2a53aa64..a5a2e5c2b 100644
--- a/xorg-server/test/Makefile.am
+++ b/xorg-server/test/Makefile.am
@@ -20,7 +20,7 @@ INCLUDES += -I$(top_srcdir)/hw/xfree86/parser \
-I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \
-I$(top_srcdir)/hw/xfree86/ramdac
endif
-TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
+TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
if XORG
if SPECIAL_DTRACE_OBJECTS
diff --git a/xorg-server/test/xi2/Makefile.am b/xorg-server/test/xi2/Makefile.am
index 913ba0f8b..9de7abf5d 100644
--- a/xorg-server/test/xi2/Makefile.am
+++ b/xorg-server/test/xi2/Makefile.am
@@ -18,7 +18,7 @@ TESTS_ENVIRONMENT = $(XORG_MALLOC_DEBUG_ENV)
AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
INCLUDES = @XORG_INCS@
-TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
+TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
COMMON_SOURCES=protocol-common.h protocol-common.c
if SPECIAL_DTRACE_OBJECTS
diff --git a/xorg-server/xkeyboard-config/symbols/keypad b/xorg-server/xkeyboard-config/symbols/keypad
index b362ebcd5..85d4d6e20 100644
--- a/xorg-server/xkeyboard-config/symbols/keypad
+++ b/xorg-server/xkeyboard-config/symbols/keypad
@@ -577,7 +577,7 @@ xkb_symbols "atm" {
};
-partial default modifier_keys
+partial modifier_keys
xkb_symbols "pointerkeys" {
key <NMLK> { [ Num_Lock, Pointer_EnableKeys ] };
};