diff options
author | marha <marha@users.sourceforge.net> | 2012-08-07 08:28:39 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-07 08:28:39 +0200 |
commit | 666141b21e89c617ca466af62ebcb56dc4f5450c (patch) | |
tree | 4d0cddde47b6d8cbc92395dc2091849f89d68138 /xorg-server/hw/xfree86 | |
parent | e158f8fc4a9cf2f884d156ff2dfc0870facfbcba (diff) | |
parent | f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0 (diff) | |
download | vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.tar.gz vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.tar.bz2 vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/hw/xwin/glx/indirect.c
xorg-server/hw/xwin/winclipboardwndproc.c
xorg-server/hw/xwin/winmultiwindowicons.c
xorg-server/hw/xwin/winmultiwindowwindow.c
xorg-server/hw/xwin/winmultiwindowwm.c
xorg-server/hw/xwin/winwin32rootlesswindow.c
xorg-server/hw/xwin/winwindow.h
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r-- | xorg-server/hw/xfree86/dixmods/glxmodule.c | 1 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2.c | 8 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/loader/loader.c | 13 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86Crtc.c | 11 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c | 171 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86EdidModes.c | 122 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86RandR12.c | 38 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c | 26 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c | 26 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/bus/Sbus.c | 20 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/lnx_apm.c | 31 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/os-support/solaris/sun_apm.c | 26 |
12 files changed, 253 insertions, 240 deletions
diff --git a/xorg-server/hw/xfree86/dixmods/glxmodule.c b/xorg-server/hw/xfree86/dixmods/glxmodule.c index 5a9e84529..c0c611401 100644 --- a/xorg-server/hw/xfree86/dixmods/glxmodule.c +++ b/xorg-server/hw/xfree86/dixmods/glxmodule.c @@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "globals.h" #include "glxserver.h" #include "extinit.h" +#include "glx_extinit.h" static MODULESETUPPROTO(glxSetup); diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c index 63feed51a..23f589cdc 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.c +++ b/xorg-server/hw/xfree86/dri2/dri2.c @@ -409,6 +409,11 @@ DRI2DrawableGone(pointer p, XID id) dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL); } + if (pPriv->prime_slave_pixmap) { + (*pPriv->prime_slave_pixmap->master_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap); + (*pPriv->prime_slave_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap); + } + if (pPriv->buffers != NULL) { for (i = 0; i < pPriv->bufferCount; i++) destroy_buffer(pDraw, pPriv->buffers[i], pPriv->prime_id); @@ -811,8 +816,9 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) if (pPriv->prime_slave_pixmap->master_pixmap == mpix) return &pPriv->prime_slave_pixmap->drawable; else { - (*master->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap); + (*pPriv->prime_slave_pixmap->master_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap); (*slave->DestroyPixmap)(pPriv->prime_slave_pixmap); + pPriv->prime_slave_pixmap = NULL; } } diff --git a/xorg-server/hw/xfree86/loader/loader.c b/xorg-server/hw/xfree86/loader/loader.c index 5fbea38f8..64c69bb8a 100644 --- a/xorg-server/hw/xfree86/loader/loader.c +++ b/xorg-server/hw/xfree86/loader/loader.c @@ -195,13 +195,12 @@ LoaderGetABIVersion(const char *abiclass) const char *name; int version; } classes[] = { - { - ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion}, { - ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion}, { - ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion}, { - ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion}, { - ABI_CLASS_FONT, LoaderVersionInfo.fontVersion}, { - NULL, 0} + {ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion}, + {ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion}, + {ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion}, + {ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion}, + {ABI_CLASS_FONT, LoaderVersionInfo.fontVersion}, + {NULL, 0} }; int i; diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index 2628409d2..154f684c4 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -734,9 +734,6 @@ xf86CrtcCloseScreen(ScreenPtr screen) for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; - if (crtc->randr_crtc->scanout_pixmap) - RRCrtcDetachScanoutPixmap(crtc->randr_crtc); - crtc->randr_crtc = NULL; } /* detach any providers */ @@ -2073,12 +2070,13 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, /* * If there's no preferred mode, but only one monitor, pick the - * biggest mode for its aspect ratio, assuming one exists. + * biggest mode for its aspect ratio or 4:3, assuming one exists. */ if (!ret) do { int i = 0; float aspect = 0.0; + DisplayModePtr a = NULL, b = NULL; /* count the number of enabled outputs */ for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++); @@ -2092,8 +2090,11 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, aspect = (float) config->output[p]->mm_width / (float) config->output[p]->mm_height; + a = bestModeForAspect(config, enabled, 4.0/3.0); if (aspect) - preferred_match[p] = bestModeForAspect(config, enabled, aspect); + b = bestModeForAspect(config, enabled, aspect); + + preferred_match[p] = biggestMode(a, b); if (preferred_match[p]) ret = TRUE; diff --git a/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c index 781c806bc..bead1265a 100644 --- a/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c +++ b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c @@ -184,105 +184,96 @@ static const struct did_dmt { short w, h, r, f; } did_dmt[] = { /* byte 3 */ - { - 640, 350, 85, 0}, { - 640, 400, 85, 0}, { - 720, 400, 85, 0}, { - 640, 480, 60, 0}, { - 640, 480, 72, 0}, { - 640, 480, 75, 0}, { - 640, 480, 85, 0}, { - 800, 600, 56, 0}, + {640, 350, 85, 0}, + {640, 400, 85, 0}, + {720, 400, 85, 0}, + {640, 480, 60, 0}, + {640, 480, 72, 0}, + {640, 480, 75, 0}, + {640, 480, 85, 0}, + {800, 600, 56, 0}, /* byte 4 */ - { - 800, 600, 60, 0}, { - 800, 600, 72, 0}, { - 800, 600, 75, 0}, { - 800, 600, 85, 0}, { - 800, 600, 120, RB}, { - 848, 480, 60, 0}, { - 1024, 768, 43, INT}, { - 1024, 768, 60, 0}, + {800, 600, 60, 0}, + {800, 600, 72, 0}, + {800, 600, 75, 0}, + {800, 600, 85, 0}, + {800, 600, 120, RB}, + {848, 480, 60, 0}, + {1024, 768, 43, INT}, + {1024, 768, 60, 0}, /* byte 5 */ - { - 1024, 768, 70, 0}, { - 1024, 768, 75, 0}, { - 1024, 768, 85, 0}, { - 1024, 768, 120, RB}, { - 1152, 864, 75, 0}, { - 1280, 768, 60, RB}, { - 1280, 768, 60, 0}, { - 1280, 768, 75, 0}, + {1024, 768, 70, 0}, + {1024, 768, 75, 0}, + {1024, 768, 85, 0}, + {1024, 768, 120, RB}, + {1152, 864, 75, 0}, + {1280, 768, 60, RB}, + {1280, 768, 60, 0}, + {1280, 768, 75, 0}, /* byte 6 */ - { - 1280, 768, 85, 0}, { - 1280, 768, 120, RB}, { - 1280, 800, 60, RB}, { - 1280, 800, 60, 0}, { - 1280, 800, 75, 0}, { - 1280, 800, 85, 0}, { - 1280, 800, 120, RB}, { - 1280, 960, 60, 0}, + {1280, 768, 85, 0}, + {1280, 768, 120, RB}, + {1280, 800, 60, RB}, + {1280, 800, 60, 0}, + {1280, 800, 75, 0}, + {1280, 800, 85, 0}, + {1280, 800, 120, RB}, + {1280, 960, 60, 0}, /* byte 7 */ - { - 1280, 960, 85, 0}, { - 1280, 960, 120, RB}, { - 1280, 1024, 60, 0}, { - 1280, 1024, 75, 0}, { - 1280, 1024, 85, 0}, { - 1280, 1024, 120, RB}, { - 1360, 768, 60, 0}, { - 1360, 768, 120, RB}, + {1280, 960, 85, 0}, + {1280, 960, 120, RB}, + {1280, 1024, 60, 0}, + {1280, 1024, 75, 0}, + {1280, 1024, 85, 0}, + {1280, 1024, 120, RB}, + {1360, 768, 60, 0}, + {1360, 768, 120, RB}, /* byte 8 */ - { - 1400, 1050, 60, RB}, { - 1400, 1050, 60, 0}, { - 1400, 1050, 75, 0}, { - 1400, 1050, 85, 0}, { - 1400, 1050, 120, RB}, { - 1440, 900, 60, RB}, { - 1440, 900, 60, 0}, { - 1440, 900, 75, 0}, + {1400, 1050, 60, RB}, + {1400, 1050, 60, 0}, + {1400, 1050, 75, 0}, + {1400, 1050, 85, 0}, + {1400, 1050, 120, RB}, + {1440, 900, 60, RB}, + {1440, 900, 60, 0}, + {1440, 900, 75, 0}, /* byte 9 */ - { - 1440, 900, 85, 0}, { - 1440, 900, 120, RB}, { - 1600, 1200, 60, 0}, { - 1600, 1200, 65, 0}, { - 1600, 1200, 70, 0}, { - 1600, 1200, 75, 0}, { - 1600, 1200, 85, 0}, { - 1600, 1200, 120, RB}, + {1440, 900, 85, 0}, + {1440, 900, 120, RB}, + {1600, 1200, 60, 0}, + {1600, 1200, 65, 0}, + {1600, 1200, 70, 0}, + {1600, 1200, 75, 0}, + {1600, 1200, 85, 0}, + {1600, 1200, 120, RB}, /* byte a */ - { - 1680, 1050, 60, RB}, { - 1680, 1050, 60, 0}, { - 1680, 1050, 75, 0}, { - 1680, 1050, 85, 0}, { - 1680, 1050, 120, RB}, { - 1792, 1344, 60, 0}, { - 1792, 1344, 75, 0}, { - 1792, 1344, 120, RB}, + {1680, 1050, 60, RB}, + {1680, 1050, 60, 0}, + {1680, 1050, 75, 0}, + {1680, 1050, 85, 0}, + {1680, 1050, 120, RB}, + {1792, 1344, 60, 0}, + {1792, 1344, 75, 0}, + {1792, 1344, 120, RB}, /* byte b */ - { - 1856, 1392, 60, 0}, { - 1856, 1392, 75, 0}, { - 1856, 1392, 120, RB}, { - 1920, 1200, 60, RB}, { - 1920, 1200, 60, 0}, { - 1920, 1200, 75, 0}, { - 1920, 1200, 85, 0}, { - 1920, 1200, 120, RB}, + {1856, 1392, 60, 0}, + {1856, 1392, 75, 0}, + {1856, 1392, 120, RB}, + {1920, 1200, 60, RB}, + {1920, 1200, 60, 0}, + {1920, 1200, 75, 0}, + {1920, 1200, 85, 0}, + {1920, 1200, 120, RB}, /* byte c */ - { - 1920, 1440, 60, 0}, { - 1920, 1440, 75, 0}, { - 1920, 1440, 120, RB}, { - 2560, 1600, 60, RB}, { - 2560, 1600, 60, 0}, { - 2560, 1600, 75, 0}, { - 2560, 1600, 85, 0}, { -2560, 1600, 120, RB},}; + {1920, 1440, 60, 0}, + {1920, 1440, 75, 0}, + {1920, 1440, 120, RB}, + {2560, 1600, 60, RB}, + {2560, 1600, 60, 0}, + {2560, 1600, 75, 0}, + {2560, 1600, 85, 0}, + {2560, 1600, 120, RB}, +}; static void didVesaTiming(int scrn, unsigned char *x, MonPtr mon) diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c index 258ada5b4..4ee862da0 100644 --- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c +++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c @@ -513,14 +513,14 @@ DDCModeDoInterlaceQuirks(DisplayModePtr mode) static const struct { int w, h; } cea_interlaced[] = { - { - 1920, 1080}, { - 720, 480}, { - 1440, 480}, { - 2880, 480}, { - 720, 576}, { - 1440, 576}, { - 2880, 576},}; + {1920, 1080}, + {720, 480}, + {1440, 480}, + {2880, 480}, + {720, 576}, + {1440, 576}, + {2880, 576}, + }; static const int n_modes = sizeof(cea_interlaced) / sizeof(cea_interlaced[0]); int i; @@ -668,68 +668,62 @@ static const struct { short r; short rb; } EstIIIModes[] = { - /* byte 6 */ - { - 640, 350, 85, 0}, { - 640, 400, 85, 0}, { - 720, 400, 85, 0}, { - 640, 480, 85, 0}, { - 848, 480, 60, 0}, { - 800, 600, 85, 0}, { - 1024, 768, 85, 0}, { - 1152, 864, 75, 0}, + /* byte 6 */ + {640, 350, 85, 0}, + {640, 400, 85, 0}, + {720, 400, 85, 0}, + {640, 480, 85, 0}, + {848, 480, 60, 0}, + {800, 600, 85, 0}, + {1024, 768, 85, 0}, + {1152, 864, 75, 0}, /* byte 7 */ - { - 1280, 768, 60, 1}, { - 1280, 768, 60, 0}, { - 1280, 768, 75, 0}, { - 1280, 768, 85, 0}, { - 1280, 960, 60, 0}, { - 1280, 960, 85, 0}, { - 1280, 1024, 60, 0}, { - 1280, 1024, 85, 0}, + {1280, 768, 60, 1}, + {1280, 768, 60, 0}, + {1280, 768, 75, 0}, + {1280, 768, 85, 0}, + {1280, 960, 60, 0}, + {1280, 960, 85, 0}, + {1280, 1024, 60, 0}, + {1280, 1024, 85, 0}, /* byte 8 */ - { - 1360, 768, 60, 0}, { - 1440, 900, 60, 1}, { - 1440, 900, 60, 0}, { - 1440, 900, 75, 0}, { - 1440, 900, 85, 0}, { - 1400, 1050, 60, 1}, { - 1400, 1050, 60, 0}, { - 1400, 1050, 75, 0}, + {1360, 768, 60, 0}, + {1440, 900, 60, 1}, + {1440, 900, 60, 0}, + {1440, 900, 75, 0}, + {1440, 900, 85, 0}, + {1400, 1050, 60, 1}, + {1400, 1050, 60, 0}, + {1400, 1050, 75, 0}, /* byte 9 */ - { - 1400, 1050, 85, 0}, { - 1680, 1050, 60, 1}, { - 1680, 1050, 60, 0}, { - 1680, 1050, 75, 0}, { - 1680, 1050, 85, 0}, { - 1600, 1200, 60, 0}, { - 1600, 1200, 65, 0}, { - 1600, 1200, 70, 0}, + {1400, 1050, 85, 0}, + {1680, 1050, 60, 1}, + {1680, 1050, 60, 0}, + {1680, 1050, 75, 0}, + {1680, 1050, 85, 0}, + {1600, 1200, 60, 0}, + {1600, 1200, 65, 0}, + {1600, 1200, 70, 0}, /* byte 10 */ - { - 1600, 1200, 75, 0}, { - 1600, 1200, 85, 0}, { - 1792, 1344, 60, 0}, { - 1792, 1344, 85, 0}, { - 1856, 1392, 60, 0}, { - 1856, 1392, 75, 0}, { - 1920, 1200, 60, 1}, { - 1920, 1200, 60, 0}, + {1600, 1200, 75, 0}, + {1600, 1200, 85, 0}, + {1792, 1344, 60, 0}, + {1792, 1344, 85, 0}, + {1856, 1392, 60, 0}, + {1856, 1392, 75, 0}, + {1920, 1200, 60, 1}, + {1920, 1200, 60, 0}, /* byte 11 */ - { - 1920, 1200, 75, 0}, { - 1920, 1200, 85, 0}, { - 1920, 1440, 60, 0}, { - 1920, 1440, 75, 0}, + {1920, 1200, 75, 0}, + {1920, 1200, 85, 0}, + {1920, 1440, 60, 0}, + {1920, 1440, 75, 0}, /* fill up last byte */ - { - 0,0,0,0}, { - 0,0,0,0}, { - 0,0,0,0}, { - 0,0,0,0}, }; + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, +}; static DisplayModePtr DDCModesFromEstIII(unsigned char *est) diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c index 4be0ea32f..3530abf24 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.c +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c @@ -60,6 +60,9 @@ typedef struct _xf86RandR12Info { * See https://bugs.freedesktop.org/show_bug.cgi?id=21554 */ xf86EnterVTProc *orig_EnterVT; + + Bool panning; + ConstrainCursorHarderProcPtr orig_ConstrainCursorHarder; } XF86RandRInfoRec, *XF86RandRInfoPtr; #ifdef RANDR_12_INTERFACE @@ -665,6 +668,10 @@ xf86RandR12SetConfig(ScreenPtr pScreen, return TRUE; } +#define PANNING_ENABLED(crtc) \ + ((crtc)->panningTotalArea.x2 > (crtc)->panningTotalArea.x1 || \ + (crtc)->panningTotalArea.y2 > (crtc)->panningTotalArea.y1) + static Bool xf86RandR12ScreenSetSize(ScreenPtr pScreen, CARD16 width, @@ -676,6 +683,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen, WindowPtr pRoot = pScreen->root; PixmapPtr pScrnPix; Bool ret = FALSE; + Bool panning = FALSE; int c; if (xf86RandR12Key) { @@ -696,8 +704,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen, for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; - if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1 || - crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) { + if (PANNING_ENABLED (crtc)) { if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1) crtc->panningTotalArea.x2 += width - pScreen->width; if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1) @@ -708,6 +715,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen, crtc->panningTrackingArea.y2 += height - pScreen->height; xf86RandR13VerifyPanningArea(crtc, width, height); xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY); + panning = TRUE; } } @@ -903,6 +911,7 @@ xf86RandR12CloseScreen(ScreenPtr pScreen) randrp = XF86RANDRINFO(pScreen); #if RANDR_12_INTERFACE xf86ScreenToScrn(pScreen)->EnterVT = randrp->orig_EnterVT; + pScreen->ConstrainCursorHarder = randrp->orig_ConstrainCursorHarder; #endif free(randrp); @@ -1216,6 +1225,7 @@ xf86RandR12CrtcSet(ScreenPtr pScreen, } xf86RandR13VerifyPanningArea(crtc, pScreen->width, pScreen->height); xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY); + randrp->panning = PANNING_ENABLED (crtc); /* * Save the last successful setting for EnterVT */ @@ -1650,6 +1660,7 @@ xf86RandR13SetPanning(ScreenPtr pScreen, BoxRec oldTotalArea; BoxRec oldTrackingArea; INT16 oldBorder[4]; + Bool oldPanning = randrp->panning; if (crtc->version < 2) return FALSE; @@ -1667,6 +1678,7 @@ xf86RandR13SetPanning(ScreenPtr pScreen, if (xf86RandR13VerifyPanningArea(crtc, pScreen->width, pScreen->height)) { xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY); + randrp->panning = PANNING_ENABLED (crtc); return TRUE; } else { @@ -1674,6 +1686,7 @@ xf86RandR13SetPanning(ScreenPtr pScreen, memcpy(&crtc->panningTotalArea, &oldTotalArea, sizeof(BoxRec)); memcpy(&crtc->panningTrackingArea, &oldTrackingArea, sizeof(BoxRec)); memcpy(crtc->panningBorder, oldBorder, 4 * sizeof(INT16)); + randrp->panning = oldPanning; return FALSE; } } @@ -1762,8 +1775,6 @@ xf86RandR14ProviderSetOutputSource(ScreenPtr pScreen, RRProviderPtr provider, RRProviderPtr source_provider) { - - if (!source_provider) { if (provider->output_source) { ScreenPtr cmScreen = pScreen->current_master; @@ -1859,6 +1870,21 @@ xf86CrtcSetScanoutPixmap(RRCrtcPtr randr_crtc, PixmapPtr pixmap) return crtc->funcs->set_scanout_pixmap(crtc, pixmap); } +static void +xf86RandR13ConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, int *x, int *y) +{ + XF86RandRInfoPtr randrp = XF86RANDRINFO(screen); + + if (randrp->panning) + return; + + if (randrp->orig_ConstrainCursorHarder) { + screen->ConstrainCursorHarder = randrp->orig_ConstrainCursorHarder; + screen->ConstrainCursorHarder(dev, screen, mode, x, y); + screen->ConstrainCursorHarder = xf86RandR13ConstrainCursorHarder; + } +} + static Bool xf86RandR12Init12(ScreenPtr pScreen) { @@ -1895,6 +1921,10 @@ xf86RandR12Init12(ScreenPtr pScreen) randrp->orig_EnterVT = pScrn->EnterVT; pScrn->EnterVT = xf86RandR12EnterVT; + randrp->panning = FALSE; + randrp->orig_ConstrainCursorHarder = pScreen->ConstrainCursorHarder; + pScreen->ConstrainCursorHarder = xf86RandR13ConstrainCursorHarder; + if (!xf86RandR12CreateObjects12(pScreen)) return FALSE; diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c index a8a4164e0..b1938cf0d 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c @@ -21,21 +21,19 @@ static struct { u_int apmBsd; pmEvent xf86; } bsdToXF86Array[] = { - { - APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, { - APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, { - APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, { - APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, { - APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, { - APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, { - APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, { - APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, { - APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, { - APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, { - APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, + {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, + {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, + {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, + {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, + {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, + {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, + {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, + {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, + {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, + {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, + {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, #ifdef APM_CAPABILITY_CHANGE - { - APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED}, + {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED}, #endif }; diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c index 10251f38e..22943855b 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c @@ -54,21 +54,19 @@ static struct { u_int apmBsd; pmEvent xf86; } bsdToXF86Array[] = { - { - APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, { - APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, { - APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, { - APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, { - APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, { - APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, { - APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, { - APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, { - APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, { - APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, { - APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, + {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, + {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, + {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, + {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, + {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, + {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, + {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, + {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, + {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, + {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, + {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, #ifdef APM_CAPABILITY_CHANGE - { - APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED}, + {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED}, #endif }; diff --git a/xorg-server/hw/xfree86/os-support/bus/Sbus.c b/xorg-server/hw/xfree86/os-support/bus/Sbus.c index b75308aa1..826000712 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Sbus.c +++ b/xorg-server/hw/xfree86/os-support/bus/Sbus.c @@ -403,16 +403,16 @@ sparcPromAssignNodes(void) int devId; char *prefix; } procFbPrefixes[] = { - { - SBUS_DEVICE_BW2, "BWtwo"}, { - SBUS_DEVICE_CG14, "CGfourteen"}, { - SBUS_DEVICE_CG6, "CGsix"}, { - SBUS_DEVICE_CG3, "CGthree"}, { - SBUS_DEVICE_FFB, "Creator"}, { - SBUS_DEVICE_FFB, "Elite 3D"}, { - SBUS_DEVICE_LEO, "Leo"}, { - SBUS_DEVICE_TCX, "TCX"}, { - 0, NULL},}; + {SBUS_DEVICE_BW2, "BWtwo"}, + {SBUS_DEVICE_CG14, "CGfourteen"}, + {SBUS_DEVICE_CG6, "CGsix"}, + {SBUS_DEVICE_CG3, "CGthree"}, + {SBUS_DEVICE_FFB, "Creator"}, + {SBUS_DEVICE_FFB, "Elite 3D"}, + {SBUS_DEVICE_LEO, "Leo"}, + {SBUS_DEVICE_TCX, "TCX"}, + {0, NULL}, + }; while (fscanf(f, "%d %63s\n", &fbNum, buffer) == 2) { for (i = 0; procFbPrefixes[i].devId; i++) diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c index a37331e52..387934099 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c @@ -42,26 +42,23 @@ static struct { apm_event_t apmLinux; pmEvent xf86; } LinuxToXF86[] = { - { - APM_SYS_STANDBY, XF86_APM_SYS_STANDBY}, { - APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND}, { - APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, { - APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME}, { - APM_LOW_BATTERY, XF86_APM_LOW_BATTERY}, { - APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, { - APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, { - APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND}, { - APM_USER_STANDBY, XF86_APM_USER_STANDBY}, { - APM_USER_SUSPEND, XF86_APM_USER_SUSPEND}, { - APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, + {APM_SYS_STANDBY, XF86_APM_SYS_STANDBY}, + {APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND}, + {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, + {APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME}, + {APM_LOW_BATTERY, XF86_APM_LOW_BATTERY}, + {APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, + {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, + {APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND}, + {APM_USER_STANDBY, XF86_APM_USER_STANDBY}, + {APM_USER_SUSPEND, XF86_APM_USER_SUSPEND}, + {APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, #if defined(APM_CAPABILITY_CHANGED) - { - APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED}, + {APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED}, #endif #if 0 - { - APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED}, { - APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED} + {APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED}, + {APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED} #endif }; diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c index 4ff64649a..b6a1432f6 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c @@ -97,21 +97,19 @@ static struct { u_int apmBsd; pmEvent xf86; } sunToXF86Array[] = { - { - APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, { - APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, { - APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, { - APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, { - APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, { - APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, { - APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, { - APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, { - APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, { - APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, { - APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, + {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, + {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, + {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, + {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, + {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, + {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, + {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, + {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, + {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, + {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, + {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, #ifdef APM_CAPABILITY_CHANGE - { - APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED}, + {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED}, #endif }; |