diff --git a/Xi/exevents.c b/Xi/exevents.c index 494d07e..106da3a 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/xiselectev.c b/Xi/xiselectev.c index 0e45cb8..ab1b624 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 c2d00bb..454838f 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/dix/devices.c b/dix/devices.c index 9cf04ed..fd4916a 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 3b40446..ddb5b34 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 4e62507..8b4379d 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 497ad7d..5f77be5 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/exa/exa_priv.h b/exa/exa_priv.h index ea7e7fa..2e4759d 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 5716138..b0a0011 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/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index f8fcde9..532d87b 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -15,6 +15,7 @@ XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h endif if XF86VIDMODE +XF86VMODESOURCES = xf86vmode.c XF86VMODE_SDK = vidmodeproc.h endif @@ -47,7 +48,7 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ xf86Mode.c xorgHelper.c xf86Extensions.h \ - xf86Extensions.c xf86vmode.c \ + xf86Extensions.c $(XF86VMODESOURCES) \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index bb2903d..74da438 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 6de8409..4ffbf7e 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 f681a85..721159d 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 83f9790..f58b87e 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 24b9473..0525e39 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 23f589c..40963c3 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/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 37cd8b3..1cf0f02 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -164,7 +164,7 @@ void XwinExtensionInit(void) int i; #ifdef XWIN_GLX_WINDOWS - if ((g_fNativeGl) && (serverGeneration == 1)) { + if (g_fNativeGl) { /* install the native GL provider */ glxWinPushNativeProvider(); } @@ -901,7 +901,8 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) { int i; - XwinExtensionInit(); + if (serverGeneration == 1) + XwinExtensionInit(); /* Log the command line */ winLogCommandLine(argc, argv); diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am index 4c2f04e..33729a9 100644 --- a/hw/xwin/Makefile.am +++ b/hw/xwin/Makefile.am @@ -109,13 +109,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 7222a9f..59f6879 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 5747f3c..f8459b8 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/man/Xserver.man b/man/Xserver.man index 8d243d6..b103551 100644 --- a/man/Xserver.man +++ b/man/Xserver.man @@ -130,7 +130,7 @@ causes the server to generate a core dump on fatal errors. .B \-displayfd \fIfd\fP specifies a file descriptor in the launching process. Rather than specify a display number, the X server will attempt to listen on successively higher -display numbers, and upon finding a free one, will write the port number back +display numbers, and upon finding a free one, will write the display number back on this file descriptor as a newline-terminated string. The \-pn option is ignored when using \-displayfd. .TP 8 diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 082c0db..c1af32e 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -709,7 +709,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;