diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-12-17 22:40:12 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-12-17 22:40:12 +0000 |
commit | 300976718089800703c8df49e18dde1e49c23d6a (patch) | |
tree | 4a5448877b7834821bc1888c9955748d19766229 | |
parent | 2ac41bd75de9dd6e18fe08112ba584f87e4fab91 (diff) | |
parent | 92ecbf5f0f516aacb7f0034e3786c4454a07fe8d (diff) |
Merge tag 'xorg-server-1.13.1' into cygwin-release-1.13
xorg-server-1.13.1
-rw-r--r-- | Xext/saver.c | 2 | ||||
-rw-r--r-- | Xi/exevents.c | 19 | ||||
-rw-r--r-- | Xi/xipassivegrab.c | 8 | ||||
-rw-r--r-- | Xi/xiselectev.c | 9 | ||||
-rw-r--r-- | config/udev.c | 8 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | dix/devices.c | 4 | ||||
-rw-r--r-- | dix/events.c | 25 | ||||
-rw-r--r-- | dix/getevents.c | 9 | ||||
-rw-r--r-- | dix/touch.c | 32 | ||||
-rw-r--r-- | dix/window.c | 2 | ||||
-rw-r--r-- | exa/exa_priv.h | 1 | ||||
-rw-r--r-- | exa/exa_unaccel.c | 16 | ||||
-rw-r--r-- | hw/dmx/dmxcursor.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86.h | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Bus.c | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Helper.c | 6 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Module.h | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86platformBus.c | 6 | ||||
-rw-r--r-- | hw/xfree86/dri2/dri2.c | 74 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 7 | ||||
-rw-r--r-- | hw/xwin/Makefile.am | 3 | ||||
-rw-r--r-- | hw/xwin/glx/Makefile.am | 3 | ||||
-rw-r--r-- | include/input.h | 1 | ||||
-rw-r--r-- | include/xkbsrv.h | 1 | ||||
-rw-r--r-- | randr/randr.c | 2 | ||||
-rw-r--r-- | xfixes/cursor.c | 12 | ||||
-rw-r--r-- | xkb/xkbAccessX.c | 8 |
28 files changed, 202 insertions, 74 deletions
diff --git a/Xext/saver.c b/Xext/saver.c index ac4a633e7..f73e2a21f 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -393,6 +393,8 @@ ScreenSaverFreeSuspend(pointer value, XID id) UpdateCurrentTimeIf(); nt_list_for_each_entry(dev, inputInfo.devices, next) lastDeviceEventTime[dev->id] = currentTime; + lastDeviceEventTime[XIAllDevices] = currentTime; + lastDeviceEventTime[XIAllMasterDevices] = currentTime; SetScreenSaverTimer(); } } diff --git a/Xi/exevents.c b/Xi/exevents.c index 494d07e20..106da3a1b 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -949,8 +949,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent *event) if (!(event->flags & TOUCH_POINTER_EMULATED)) return DONT_PROCESS; - if (!(event->flags & TOUCH_END)) - return DONT_PROCESS; DecreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask, &t->state); @@ -1561,6 +1559,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) uint32_t touchid; int type = ev->any.type; int emulate_pointer = ! !(ev->device_event.flags & TOUCH_POINTER_EMULATED); + DeviceIntPtr kbd; if (!t) return; @@ -1570,9 +1569,6 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) else touchid = ev->device_event.touchid; - if (emulate_pointer) - UpdateDeviceState(dev, &ev->device_event); - if (type == ET_TouchBegin) { ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid, emulate_pointer); @@ -1619,9 +1615,14 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) * events which _only_ emulate motion just work normally */ if (emulate_pointer && ev->any.type != ET_TouchUpdate) DeliverEmulatedMotionEvent(dev, ti, ev); + if (emulate_pointer && IsMaster(dev)) CheckMotion(&ev->device_event, dev); + kbd = GetMaster(dev, KEYBOARD_OR_FLOAT); + event_set_state(NULL, kbd, &ev->device_event); + ev->device_event.corestate = event_get_corestate(NULL, kbd); + /* Make sure we have a valid window trace for event delivery; must be * called after event type mutation. Touch end events are always processed * in order to end touch records. */ @@ -1643,6 +1644,9 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) if (ev->any.type == ET_TouchEnd) TouchEndTouch(dev, ti); } + + if (emulate_pointer) + UpdateDeviceState(dev, &ev->device_event); } /** @@ -1864,6 +1868,11 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, goto out; } + if (listener->state == LISTENER_AWAITING_BEGIN) { + listener->state = LISTENER_HAS_END; + goto out; + } + /* Event in response to reject */ if (ev->device_event.flags & TOUCH_REJECT) { if (listener->state != LISTENER_HAS_END) diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c index ddab53dec..62a3a469f 100644 --- a/Xi/xipassivegrab.c +++ b/Xi/xipassivegrab.c @@ -50,7 +50,7 @@ int SProcXIPassiveGrabDevice(ClientPtr client) { int i; - xXIModifierInfo *mods; + uint32_t *mods; REQUEST(xXIPassiveGrabDeviceReq); @@ -63,12 +63,10 @@ SProcXIPassiveGrabDevice(ClientPtr client) swaps(&stuff->mask_len); swaps(&stuff->num_modifiers); - mods = (xXIModifierInfo *) &stuff[1]; + mods = (uint32_t *) &stuff[1]; for (i = 0; i < stuff->num_modifiers; i++, mods++) { - swapl(&mods->base_mods); - swapl(&mods->latched_mods); - swapl(&mods->locked_mods); + swapl(mods); } return ProcXIPassiveGrabDevice(client); diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index 0e45cb8cb..ab1b6245f 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -180,8 +180,13 @@ ProcXISelectEvents(ClientPtr client) if (CLIENT_ID(iclient->resource) == client->index) continue; - dixLookupDevice(&tmp, evmask->deviceid, serverClient, - DixReadAccess); + if (evmask->deviceid == XIAllDevices) + tmp = inputInfo.all_devices; + else if (evmask->deviceid == XIAllMasterDevices) + tmp = inputInfo.all_master_devices; + else + dixLookupDevice(&tmp, evmask->deviceid, serverClient, + DixReadAccess); if (!tmp) return BadImplementation; /* this shouldn't happen */ diff --git a/config/udev.c b/config/udev.c index c2d00bbda..454838f4c 100644 --- a/config/udev.c +++ b/config/udev.c @@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask) return; action = udev_device_get_action(udev_device); if (action) { - if (!strcmp(action, "add") || !strcmp(action, "change")) { + if (!strcmp(action, "add")) { device_removed(udev_device); device_added(udev_device); + } else if (!strcmp(action, "change")) { + /* ignore change for the drm devices */ + if (strcmp(udev_device_get_subsystem(udev_device), "drm")) { + device_removed(udev_device); + device_added(udev_device); + } } else if (!strcmp(action, "remove")) device_removed(udev_device); diff --git a/configure.ac b/configure.ac index e3f499ebe..60a8a8d8a 100644 --- a/configure.ac +++ b/configure.ac @@ -26,9 +26,9 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.60) -AC_INIT([xorg-server], 1.13.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2012-09-05" -RELEASE_NAME="Iced Tea" +AC_INIT([xorg-server], 1.13.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2012-12-13" +RELEASE_NAME="Chrysanthemum Tea" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE diff --git a/dix/devices.c b/dix/devices.c index 9cf04ed3f..fd4916a3a 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -306,6 +306,9 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) /* unity matrix */ memset(transform, 0, sizeof(transform)); transform[0] = transform[4] = transform[8] = 1.0f; + dev->transform.m[0][0] = 1.0; + dev->transform.m[1][1] = 1.0; + dev->transform.m[2][2] = 1.0; XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), XIGetKnownProperty(XATOM_FLOAT), 32, @@ -440,6 +443,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) if (*prev != dev) return FALSE; + TouchEndPhysicallyActiveTouches(dev); ReleaseButtonsAndKeys(dev); SyncRemoveDeviceIdleTime(dev->idle_counter); dev->idle_counter = NULL; diff --git a/dix/events.c b/dix/events.c index 3b40446bc..ddb5b343d 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1555,11 +1555,13 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, WindowPtr oldWin; /* slave devices need to float for the duration of the grab. */ - if (grab->grabtype == XI2 && + if (grab->grabtype == XI2 && keybd->enabled && !(passive & ImplicitGrabMask) && !IsMaster(keybd)) DetachFromMaster(keybd); - if (grabinfo->grab) + if (!keybd->enabled) + oldWin = NULL; + else if (grabinfo->grab) oldWin = grabinfo->grab->window; else if (keybd->focus) oldWin = keybd->focus->win; @@ -1569,7 +1571,8 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, oldWin = keybd->focus->win; if (keybd->valuator) keybd->valuator->motionHintWindow = NullWindow; - DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); + if (oldWin) + DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); if (syncEvents.playingEvents) grabinfo->grabTime = syncEvents.time; else @@ -1590,13 +1593,10 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) { GrabPtr grab = keybd->deviceGrab.grab; DeviceIntPtr dev; - WindowPtr focusWin = keybd->focus ? keybd->focus->win - : keybd->spriteInfo->sprite->win; + WindowPtr focusWin; Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab && keybd->deviceGrab.implicitGrab); - if (focusWin == FollowKeyboardWin) - focusWin = inputInfo.keyboard->focus->win; if (keybd->valuator) keybd->valuator->motionHintWindow = NullWindow; keybd->deviceGrab.grab = NullGrab; @@ -1607,6 +1607,17 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) if (dev->deviceGrab.sync.other == grab) dev->deviceGrab.sync.other = NullGrab; } + + if (keybd->focus) + focusWin = keybd->focus->win; + else if (keybd->spriteInfo->sprite) + focusWin = keybd->spriteInfo->sprite->win; + else + focusWin = NullWindow; + + if (focusWin == FollowKeyboardWin) + focusWin = inputInfo.keyboard->focus->win; + DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); if (!wasImplicit && grab->grabtype == XI2) diff --git a/dix/getevents.c b/dix/getevents.c index 4e62507aa..8b4379d1c 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -896,9 +896,9 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask, /* scale x&y to desktop coordinates */ *screenx = rescaleValuatorAxis(x, dev->valuator->axes + 0, NULL, - screenInfo.x, screenInfo.width); + screenInfo.x, screenInfo.width - 1); *screeny = rescaleValuatorAxis(y, dev->valuator->axes + 1, NULL, - screenInfo.y, screenInfo.height); + screenInfo.y, screenInfo.height - 1); *devx = x; *devy = y; @@ -1400,8 +1400,9 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, coordinates were. */ if (flags & POINTER_SCREEN) { - screenx = sx; - screeny = sy; + scr = miPointerGetScreen(pDev); + screenx = sx + scr->x; + screeny = sy + scr->y; } scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative, diff --git a/dix/touch.c b/dix/touch.c index 497ad7dac..5f77be575 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -572,8 +572,8 @@ TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, return FALSE; /* Mark which grabs/event selections we're delivering to: max one grab per - * window plus the bottom-most event selection. */ - ti->listeners = calloc(sprite->spriteTraceGood + 1, sizeof(*ti->listeners)); + * window plus the bottom-most event selection, plus any active grab. */ + ti->listeners = calloc(sprite->spriteTraceGood + 2, sizeof(*ti->listeners)); if (!ti->listeners) { sprite->spriteTraceGood = 0; return FALSE; @@ -1029,3 +1029,31 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, return TouchListenerAcceptReject(dev, ti, i, mode); } + +/** + * End physically active touches for a device. + */ +void +TouchEndPhysicallyActiveTouches(DeviceIntPtr dev) +{ + InternalEvent *eventlist = InitEventList(GetMaximumEventsNum()); + int i; + + OsBlockSignals(); + mieqProcessInputEvents(); + for (i = 0; i < dev->last.num_touches; i++) { + DDXTouchPointInfoPtr ddxti = dev->last.touches + i; + + if (ddxti->active) { + int j; + int nevents = GetTouchEvents(eventlist, dev, ddxti->ddx_id, + XI_TouchEnd, 0, NULL); + + for (j = 0; j < nevents; j++) + mieqProcessDeviceEvent(dev, eventlist + j, NULL); + } + } + OsReleaseSignals(); + + FreeEventList(eventlist, GetMaximumEventsNum()); +} diff --git a/dix/window.c b/dix/window.c index cdd12dca6..49ef4a081 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3132,6 +3132,8 @@ dixSaveScreens(ClientPtr client, int on, int mode) UpdateCurrentTimeIf(); nt_list_for_each_entry(dev, inputInfo.devices, next) lastDeviceEventTime[dev->id] = currentTime; + lastDeviceEventTime[XIAllDevices] = currentTime; + lastDeviceEventTime[XIAllMasterDevices] = currentTime; } SetScreenSaverTimer(); } diff --git a/exa/exa_priv.h b/exa/exa_priv.h index ea7e7faff..2e4759def 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -209,6 +209,7 @@ typedef struct { RegionRec srcReg; RegionRec maskReg; PixmapPtr srcPix; + PixmapPtr maskPix; DevPrivateKeyRec pixmapPrivateKeyRec; DevPrivateKeyRec gcPrivateKeyRec; diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index 571613886..b0a0011cb 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -442,6 +442,13 @@ ExaSrcValidate(DrawablePtr pDrawable, RegionPtr dst; int xoff, yoff; + if (pExaScr->srcPix == pPix) + dst = &pExaScr->srcReg; + else if (pExaScr->maskPix == pPix) + dst = &pExaScr->maskReg; + else + return; + exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); box.x1 = x + xoff; @@ -449,8 +456,6 @@ ExaSrcValidate(DrawablePtr pDrawable, box.x2 = box.x1 + width; box.y2 = box.y1 + height; - dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg; - RegionInit(®, &box, 1); RegionUnion(dst, dst, ®); RegionUninit(®); @@ -495,16 +500,19 @@ ExaPrepareCompositeReg(ScreenPtr pScreen, if (pSrc != pDst) RegionTranslate(pSrc->pCompositeClip, -pSrc->pDrawable->x, -pSrc->pDrawable->y); - } + } else + pExaScr->srcPix = NULL; if (pMask && pMask->pDrawable) { pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); RegionNull(&pExaScr->maskReg); maskReg = &pExaScr->maskReg; + pExaScr->maskPix = pMaskPix; if (pMask != pDst && pMask != pSrc) RegionTranslate(pMask->pCompositeClip, -pMask->pDrawable->x, -pMask->pDrawable->y); - } + } else + pExaScr->maskPix = NULL; RegionTranslate(pDst->pCompositeClip, -pDst->pDrawable->x, -pDst->pDrawable->y); diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c index 1a77c7d78..35aca81b4 100644 --- a/hw/dmx/dmxcursor.c +++ b/hw/dmx/dmxcursor.c @@ -346,6 +346,8 @@ dmxComputeScreenOrigins(void) screenInfo.screens[i]->y -= minY; } } + + update_desktop_dimensions(); } /** Recompute origin information in the #dmxScreens list. This is diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index bb2903da0..74da4389a 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -468,4 +468,8 @@ extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn); /* flags passed to xf86 allocate screen */ #define XF86_ALLOCATE_GPU_SCREEN 1 +/* Update the internal total dimensions of all ScreenRecs together */ +extern _X_EXPORT void +xf86UpdateDesktopDimensions(void); + #endif /* _XF86_H */ diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 6de8409fc..4ffbf7e46 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -81,6 +81,8 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only) if (drv->platformProbe != NULL) { foundScreen = xf86platformProbeDev(drv); } + if (ServerIsNotSeat0()) + return foundScreen; #endif #ifdef XSERVER_LIBPCIACCESS @@ -214,6 +216,8 @@ xf86BusProbe(void) { #ifdef XSERVER_PLATFORM_BUS xf86platformProbe(); + if (ServerIsNotSeat0()) + return; #endif #ifdef XSERVER_LIBPCIACCESS xf86PciProbe(); diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index f681a8577..721159d0b 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1898,3 +1898,9 @@ xf86ScrnToScreen(ScrnInfoPtr pScrn) return screenInfo.screens[pScrn->scrnIndex]; } } + +void +xf86UpdateDesktopDimensions(void) +{ + update_desktop_dimensions(); +} diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 83f9790d2..f58b87e30 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -80,7 +80,7 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(13, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(13, 1) #define ABI_XINPUT_VERSION SET_ABI_VERSION(18, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index 24b947326..0525e39bc 100644 --- a/hw/xfree86/common/xf86platformBus.c +++ b/hw/xfree86/common/xf86platformBus.c @@ -213,11 +213,12 @@ xf86platformProbe(void) int i; Bool pci = TRUE; + config_odev_probe(xf86PlatformDeviceProbe); + if (!xf86scanpci()) { pci = FALSE; } - config_odev_probe(&xf86PlatformDeviceProbe); for (i = 0; i < xf86_num_platform_devices; i++) { char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); @@ -358,6 +359,9 @@ xf86platformProbeDev(DriverPtr drvp) break; } else { + /* for non-seat0 servers assume first device is the master */ + if (ServerIsNotSeat0()) + break; if (xf86_platform_devices[j].pdev) { if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) break; diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 23f589cdc..40963c3b0 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -766,6 +766,44 @@ static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable) } } +/* + * A TraverseTree callback to invalidate all windows using the same + * pixmap + */ +static int +DRI2InvalidateWalk(WindowPtr pWin, pointer data) +{ + if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data) + return WT_DONTWALKCHILDREN; + DRI2InvalidateDrawable(&pWin->drawable); + return WT_WALKCHILDREN; +} + +static void +DRI2InvalidateDrawableAll(DrawablePtr pDraw) +{ + if (pDraw->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDraw; + PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin); + + /* + * Find the top-most window using this pixmap + */ + while (pWin->parent && + pDraw->pScreen->GetWindowPixmap(pWin->parent) == pPixmap) + pWin = pWin->parent; + + /* + * Walk the sub-tree to invalidate all of the + * windows using the same pixmap + */ + TraverseTree(pWin, DRI2InvalidateWalk, pPixmap); + DRI2InvalidateDrawable(&pPixmap->drawable); + } + else + DRI2InvalidateDrawable(pDraw); +} + DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) { DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); @@ -831,6 +869,8 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) spix->screen_x = mpix->screen_x; spix->screen_y = mpix->screen_y; #endif + + DRI2InvalidateDrawableAll(pDraw); return &spix->drawable; } @@ -1048,18 +1088,7 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable) return FALSE; } -/* - * A TraverseTree callback to invalidate all windows using the same - * pixmap - */ -static int -DRI2InvalidateWalk(WindowPtr pWin, pointer data) -{ - if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data) - return WT_DONTWALKCHILDREN; - DRI2InvalidateDrawable(&pWin->drawable); - return WT_WALKCHILDREN; -} + int DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, @@ -1162,26 +1191,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, */ *swap_target = pPriv->swap_count + pPriv->swapsPending; - if (pDraw->type == DRAWABLE_WINDOW) { - WindowPtr pWin = (WindowPtr) pDraw; - PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin); - - /* - * Find the top-most window using this pixmap - */ - while (pWin->parent && - pScreen->GetWindowPixmap(pWin->parent) == pPixmap) - pWin = pWin->parent; - - /* - * Walk the sub-tree to invalidate all of the - * windows using the same pixmap - */ - TraverseTree(pWin, DRI2InvalidateWalk, pPixmap); - DRI2InvalidateDrawable(&pPixmap->drawable); - } - else - DRI2InvalidateDrawable(pDraw); + DRI2InvalidateDrawableAll(pDraw); return Success; } diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index e3eaf5f4c..13251cff4 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -66,6 +66,7 @@ xf86CrtcConfigInit(ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec * funcs) config = xnfcalloc(1, sizeof(xf86CrtcConfigRec)); config->funcs = funcs; + config->compat_output = -1; scrn->privates[xf86CrtcConfigPrivateIndex].ptr = config; } @@ -1841,11 +1842,15 @@ SetCompatOutput(xf86CrtcConfigPtr config) if (compat >= 0) { config->compat_output = compat; } - else { + else if (config->compat_output >= 0 && config->compat_output < config->num_output) { /* Don't change the compat output when no valid outputs found */ output = config->output[config->compat_output]; } + /* All outputs are disconnected, select one to fake */ + if (!output && config->num_output) + output = config->output[0]; + return output; } diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am index 33ab6e95c..c1e2cef46 100644 --- a/hw/xwin/Makefile.am +++ b/hw/xwin/Makefile.am @@ -112,13 +112,16 @@ SRCS = InitInput.c \ winclipboard.h \ winconfig.h \ win.h \ + winglobals.h \ winkeybd.h \ winkeynames.h \ winlayouts.h \ winmessages.h \ + winmonitors.h \ winmsg.h \ winms.h \ winmultiwindowclass.h \ + winmultiwindowicons.h \ winprefs.h \ winresource.h \ winwindow.h \ diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am index 7222a9f21..59f6879a7 100644 --- a/hw/xwin/glx/Makefile.am +++ b/hw/xwin/glx/Makefile.am @@ -6,7 +6,8 @@ libXwinGLX_la_SOURCES = \ glwindows.h \ glwrap.c \ indirect.c \ - wgl_ext_api.c + wgl_ext_api.c \ + wgl_ext_api.h if XWIN_MULTIWINDOW DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW diff --git a/include/input.h b/include/input.h index 5747f3cd2..f8459b8c8 100644 --- a/include/input.h +++ b/include/input.h @@ -579,6 +579,7 @@ extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener, int mode); extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, uint32_t touchid, Window grab_window, XID *error); +extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev); /* misc event helpers */ extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients); diff --git a/include/xkbsrv.h b/include/xkbsrv.h index d58478543..78b8f5abe 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -171,6 +171,7 @@ typedef struct _XkbSrvInfo { KeyCode mouseKey; KeyCode inactiveKey; KeyCode slowKey; + KeyCode slowKeyEnableKey; KeyCode repeatKey; CARD8 krgTimerActive; CARD8 beepType; diff --git a/randr/randr.c b/randr/randr.c index da48c3f06..f0decfc6c 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -264,6 +264,8 @@ RRInit(void) return FALSE; if (!RROutputInit()) return FALSE; + if (!RRProviderInit()) + return FALSE; RRGeneration = serverGeneration; } if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0)) diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 4eee59246..4d4a75e3e 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -1090,7 +1090,11 @@ barrier_is_blocking(const struct PointerBarrier * barrier, if (dir & BarrierNegativeX && x1 == (barrier->x1 - 1)) return FALSE; /* startpoint adjacent to barrier, moving towards -> block */ - if (x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) { + if (dir & BarrierPositiveX && x1 == (barrier->x1 - 1) && y1 >= barrier->y1 && y1 <= barrier->y2) { + *distance = 0; + return TRUE; + } + if (dir & BarrierNegativeX && x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) { *distance = 0; return TRUE; } @@ -1102,7 +1106,11 @@ barrier_is_blocking(const struct PointerBarrier * barrier, if (dir & BarrierNegativeY && y1 == (barrier->y1 - 1)) return FALSE; /* startpoint adjacent to barrier, moving towards -> block */ - if (y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) { + if (dir & BarrierPositiveY && y1 == (barrier->y1 - 1) && x1 >= barrier->x1 && x1 <= barrier->x2) { + *distance = 0; + return TRUE; + } + if (dir & BarrierNegativeY && y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) { *distance = 0; return TRUE; } diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 082c0db57..21df85d94 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -291,8 +291,8 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg) return 4000; } xkbi->krgTimerActive = _OFF_TIMER; - cn.keycode = 0; - cn.eventType = 0; + cn.keycode = xkbi->slowKeyEnableKey; + cn.eventType = KeyPress; cn.requestMajor = 0; cn.requestMinor = 0; if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask) { @@ -304,6 +304,7 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg) LogMessage(X_INFO, "XKB SlowKeys are now enabled. Hold shift to disable.\n"); } + xkbi->slowKeyEnableKey = 0; return 0; } @@ -462,6 +463,7 @@ AccessXFilterPressEvent(DeviceEvent *event, DeviceIntPtr keybd) if (ctrls->enabled_ctrls & XkbAccessXKeysMask) { /* check for magic sequences */ if ((sym[0] == XK_Shift_R) || (sym[0] == XK_Shift_L)) { + xkbi->slowKeyEnableKey = key; if (XkbAX_NeedFeedback(ctrls, XkbAX_SlowWarnFBMask)) { xkbi->krgTimerActive = _KRG_WARN_TIMER; xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 4000, @@ -709,7 +711,7 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse) xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); DeviceEvent *event = &ev->device_event; - dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); + dev = (IsMaster(mouse) || IsFloating(mouse)) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); if (dev && dev->key) { xkbi = dev->key->xkbInfo; |