diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2006-08-18 09:13:52 +0100 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2006-08-18 09:13:52 +0100 |
commit | 708b225689b5a4ba9ffe3372b584b715ef9eacdc (patch) | |
tree | df52f91b74b36def891a8dd16e0cb3ded0abf30b | |
parent | e1f4565be5ce80be4655e81f77f4073fa3fbf8d0 (diff) | |
parent | ee5e2cbd2bee610a95facc6b486c4a5070973099 (diff) |
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
-rw-r--r-- | dix/events.c | 89 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Configure.c | 3 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Mode.c | 78 |
3 files changed, 39 insertions, 131 deletions
diff --git a/dix/events.c b/dix/events.c index 20da048e1..7225543a3 100644 --- a/dix/events.c +++ b/dix/events.c @@ -458,13 +458,7 @@ XineramaCheckVirtualMotion( if (qe) { sprite.hot.pScreen = qe->pScreen; /* should always be Screen 0 */ -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = qe->event->u.keyButtonPointer.rootX; -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = qe->event->u.keyButtonPointer.rootY; pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : NullWindow; @@ -501,24 +495,12 @@ XineramaCheckVirtualMotion( lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2); if (sprite.hot.x < lims.x1) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = lims.x1; else if (sprite.hot.x >= lims.x2) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = lims.x2 - 1; if (sprite.hot.y < lims.y1) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = lims.y1; else if (sprite.hot.y >= lims.y2) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = lims.y2 - 1; if (REGION_NUM_RECTS(&sprite.Reg2) > 1) @@ -531,6 +513,10 @@ XineramaCheckVirtualMotion( qe->event->u.keyButtonPointer.rootY = sprite.hot.y; } } +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; +#endif } @@ -548,33 +534,15 @@ XineramaCheckMotion(xEvent *xE) panoramiXdataPtr[0].x; XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y - panoramiXdataPtr[0].y; -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = XE_KBPTR.rootX; -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = XE_KBPTR.rootY; if (sprite.hot.x < sprite.physLimits.x1) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = sprite.physLimits.x1; else if (sprite.hot.x >= sprite.physLimits.x2) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = sprite.physLimits.x2 - 1; if (sprite.hot.y < sprite.physLimits.y1) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = sprite.physLimits.y1; else if (sprite.hot.y >= sprite.physLimits.y2) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = sprite.physLimits.y2 - 1; if (sprite.hotShape) @@ -592,6 +560,8 @@ XineramaCheckMotion(xEvent *xE) } #ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; xeviewin = #endif sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y); @@ -817,13 +787,7 @@ CheckVirtualMotion( if (qe) { sprite.hot.pScreen = qe->pScreen; -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = qe->event->u.keyButtonPointer.rootX; -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = qe->event->u.keyButtonPointer.rootY; pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : NullWindow; @@ -835,31 +799,16 @@ CheckVirtualMotion( if (sprite.hot.pScreen != pWin->drawable.pScreen) { sprite.hot.pScreen = pWin->drawable.pScreen; -#ifdef XEVIE - xeviehot.x = xeviehot.y = 0; -#endif sprite.hot.x = sprite.hot.y = 0; } lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize); if (sprite.hot.x < lims.x1) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = lims.x1; else if (sprite.hot.x >= lims.x2) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = lims.x2 - 1; if (sprite.hot.y < lims.y1) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = lims.y1; else if (sprite.hot.y >= lims.y2) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = lims.y2 - 1; #ifdef SHAPE if (wBoundingShape(pWin)) @@ -872,6 +821,10 @@ CheckVirtualMotion( qe->event->u.keyButtonPointer.rootY = sprite.hot.y; } } +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; +#endif ROOT = WindowTable[sprite.hot.pScreen->myNum]; } @@ -2053,38 +2006,24 @@ CheckMotion(xEvent *xE) sprite.hot.pScreen = sprite.hotPhys.pScreen; ROOT = WindowTable[sprite.hot.pScreen->myNum]; } -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = XE_KBPTR.rootX; -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = XE_KBPTR.rootY; if (sprite.hot.x < sprite.physLimits.x1) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = sprite.physLimits.x1; else if (sprite.hot.x >= sprite.physLimits.x2) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = sprite.physLimits.x2 - 1; if (sprite.hot.y < sprite.physLimits.y1) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = sprite.physLimits.y1; else if (sprite.hot.y >= sprite.physLimits.y2) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = sprite.physLimits.y2 - 1; #ifdef SHAPE if (sprite.hotShape) ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y); #endif +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; +#endif sprite.hotPhys = sprite.hot; if ((sprite.hotPhys.x != XE_KBPTR.rootX) || (sprite.hotPhys.y != XE_KBPTR.rootY)) diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index f0efa625e..cb091080c 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -87,6 +87,9 @@ static char *DFLT_MOUSE_DEV = "/dev/devi/mouse0"; #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) static char *DFLT_MOUSE_DEV = "/dev/sysmouse"; static char *DFLT_MOUSE_PROTO = "auto"; +#elif defined(linux) +static char DFLT_MOUSE_DEV[] = "/dev/input/mice"; +static char DFLT_MOUSE_PROTO[] = "auto"; #else static char *DFLT_MOUSE_DEV = "/dev/mouse"; static char *DFLT_MOUSE_PROTO = "auto"; diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index 72dd1cabb..cd57e9916 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -47,6 +47,22 @@ #include "xf86Priv.h" #include "xf86DDC.h" +static void +printModeRejectMessage(int index, DisplayModePtr p, int status) +{ + char *type; + + if (p->type & M_T_BUILTIN) + type = "built-in "; + else if (p->type & M_T_DEFAULT) + type = "default "; + else + type = ""; + + xf86DrvMsg(index, X_INFO, "Not using %smode \"%s\" (%s)\n", type, p->name, + xf86ModeStatusToString(status)); +} + /* * xf86GetNearestClock -- * Find closest clock to given frequency (in kHz). This assumes the @@ -1644,18 +1660,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, q->name = xnfstrdup(p->name); q->status = MODE_OK; } else { - if (p->type & M_T_BUILTIN) - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using built-in mode \"%s\" (%s)\n", - p->name, xf86ModeStatusToString(status)); - else if (p->type & M_T_DEFAULT) - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using default mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(status)); - else - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(status)); + printModeRejectMessage(scrp->scrnIndex, p, status); } } @@ -1796,39 +1801,14 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, repeat = FALSE; lookupNext: - if (repeat && ((status = p->status) != MODE_OK)) { - if (p->type & M_T_BUILTIN) - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using built-in mode \"%s\" (%s)\n", - p->name, xf86ModeStatusToString(status)); - else if (p->type & M_T_DEFAULT) - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using default mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(status)); - else - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(status)); - } + if (repeat && ((status = p->status) != MODE_OK)) + printModeRejectMessage(scrp->scrnIndex, p, status); saveType = p->type; status = xf86LookupMode(scrp, p, clockRanges, strategy); - if (repeat && status == MODE_NOMODE) { + if (repeat && status == MODE_NOMODE) continue; - } - if (status != MODE_OK) { - if (p->type & M_T_BUILTIN) - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using built-in mode \"%s\" (%s)\n", - p->name, xf86ModeStatusToString(status)); - else if (p->type & M_T_DEFAULT) - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using default mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(status)); - else - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(status)); - } + if (status != MODE_OK) + printModeRejectMessage(scrp->scrnIndex, p, status); if (status == MODE_ERROR) { ErrorF("xf86ValidateModes: " "unexpected result from xf86LookupMode()\n"); @@ -2023,20 +2003,6 @@ xf86PruneDriverModes(ScrnInfoPtr scrp) return; n = p->next; if (p->status != MODE_OK) { -#if 0 - if (p->type & M_T_BUILTIN) - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using built-in mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(p->status)); - else if (p->type & M_T_DEFAULT) - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using default mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(p->status)); - else - xf86DrvMsg(scrp->scrnIndex, X_INFO, - "Not using mode \"%s\" (%s)\n", p->name, - xf86ModeStatusToString(p->status)); -#endif xf86DeleteMode(&(scrp->modes), p); } p = n; |