diff options
Diffstat (limited to 'xorg-server')
26 files changed, 142 insertions, 117 deletions
diff --git a/xorg-server/composite/compalloc.c b/xorg-server/composite/compalloc.c index b958b0942..cc69c68f2 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 baa26c4b8..75708520f 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" @@ -756,6 +757,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. * @@ -774,13 +798,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); + } } } @@ -1506,6 +1534,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 @@ -1560,7 +1589,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; @@ -1596,8 +1625,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 e2d960ec6..15f7ef868 100644 --- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py +++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py @@ -67,7 +67,7 @@ if dispatchheader : fh = open(dispatchheader) dispatchh = fh.readlines() - dispatch_regex = re.compile(r'#define\sSET_(\S*)\(') + dispatch_regex = re.compile(r'^SET_(\S*)\(') for line in dispatchh : line = line.strip() @@ -308,12 +308,20 @@ for w in sorted(wrappers.keys()) : if dispatchheader : print 'void glWinSetupDispatchTable(void)' print '{' - print ' struct _glapi_table *disp = _glapi_get_dispatch();' + print ' static struct _glapi_table *disp = NULL;' + print '' + print ' if (!disp)' + print ' {' + print ' disp = calloc(sizeof(void *), _glapi_get_dispatch_table_size());' + print ' assert(disp);' 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 '#warning No wrapper for ' + prefix + d + ' !' + print ' }' + print '' + print ' _glapi_set_dispatch(disp);' print '}' diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index 56f677a8f..3f34146e5 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -398,7 +398,9 @@ fbConfigsDump(unsigned int n, __GLXconfig * c) static __GLXscreen *glxWinScreenProbe(ScreenPtr pScreen); static __GLXcontext *glxWinCreateContext(__GLXscreen * screen, __GLXconfig * modes, - __GLXcontext * baseShareContext); + __GLXcontext * baseShareContext, + unsigned num_attribs, + const uint32_t * attribs, int *error); static __GLXdrawable *glxWinCreateDrawable(ClientPtr client, __GLXscreen * screen, DrawablePtr pDraw, @@ -473,7 +475,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) { @@ -482,6 +484,8 @@ glxLogExtensions(const char *prefix, const char *extensions) } strl = strtok(str, " "); + if (strl == NULL) + strl = ""; ErrorF("%s%s", prefix, strl); length = strlen(prefix) + strlen(strl); @@ -515,6 +519,7 @@ glxWinScreenProbe(ScreenPtr pScreen) { glxWinScreen *screen; const char *gl_extensions; + const char *gl_renderer; const char *wgl_extensions; HWND hwnd; HDC hdc; @@ -538,14 +543,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; - /* Dump out some useful information about the native renderer */ // create window class @@ -595,7 +592,8 @@ glxWinScreenProbe(ScreenPtr pScreen) ErrorF("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION)); ErrorF("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR)); - ErrorF("GL_RENDERER: %s\n", glGetStringWrapperNonstatic(GL_RENDERER)); + gl_renderer = (const char *) glGetStringWrapperNonstatic(GL_RENDERER); + ErrorF("GL_RENDERER: %s\n", gl_renderer); gl_extensions = (const char *) glGetStringWrapperNonstatic(GL_EXTENSIONS); glxLogExtensions("GL_EXTENSIONS: ", gl_extensions); wgl_extensions = wglGetExtensionsStringARBWrapper(hdc); @@ -603,6 +601,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 @@ -720,9 +725,6 @@ glxWinScreenProbe(ScreenPtr pScreen) __glXScreenInit(&screen->base, pScreen); - // dump out fbConfigs now fbConfigIds and visualIDs have been assigned - fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs); - // Override the GL extensions string set by __glXScreenInit() screen->base.GLextensions = strdup(gl_extensions); @@ -765,6 +767,17 @@ glxWinScreenProbe(ScreenPtr pScreen) ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); + // dump out fbConfigs now fbConfigIds and visualIDs have been assigned + fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs); + + /* 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; + return &screen->base; } @@ -1571,7 +1584,8 @@ glxWinContextDestroy(__GLXcontext * base) static __GLXcontext * glxWinCreateContext(__GLXscreen * screen, - __GLXconfig * modes, __GLXcontext * baseShareContext) + __GLXconfig * modes, __GLXcontext * baseShareContext, + 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 039942f91..344147220 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -353,6 +353,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 ] }; }; |