Xi: add missing call for SProcXChangeDeviceCursor
add DeviceEnterNotify and DeviceLeaveNotify fix: QueryDevicePointer crashed if called with keyboard device
This commit is contained in:
parent
a7ab793293
commit
ea82333dc1
575
Changelog
575
Changelog
|
@ -1,575 +0,0 @@
|
|||
== 08.01.06 ==
|
||||
Xi: Adding ChangeDeviceCursor request
|
||||
|
||||
Files:
|
||||
dix/window.c
|
||||
dix/events.c
|
||||
include/window.h
|
||||
include/windowstr.h
|
||||
Xi/extinit.c
|
||||
Xi/chdevcur.c
|
||||
Xi/chdevcur.h
|
||||
Xi/Makefile.am
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
xfree86: fix XI86_SHARED_POINTER flag setting
|
||||
|
||||
File:
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
|
||||
== 20.12.06 ==
|
||||
xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default
|
||||
to MP devices.
|
||||
|
||||
Xi: Adding QueryDevicePointer request/reply
|
||||
Adding WarpDevicePointer request/reply
|
||||
|
||||
Files:
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
hw/xfree86/common/xf86Cursor.c
|
||||
hw/xfree86/common/xf86Xinput.h
|
||||
Xi/extinit.c
|
||||
Xi/querydp.c
|
||||
Xi/querydp.h
|
||||
Xi/Makefile.am
|
||||
Xi/warpdevp.c
|
||||
Xi/warpdevp.h
|
||||
dix/cursor.c
|
||||
dix/events.c
|
||||
dix/dix.h
|
||||
|
||||
Note: This commit requires libXi additions to use the new functions.
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
xfree86: fix xf86ActivateDevice(): only set to MP device if not a keyboard
|
||||
|
||||
Files:
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
include/extinit.h
|
||||
Xi/extinit.c
|
||||
|
||||
____________________________________________________________
|
||||
removing MPX extension files
|
||||
|
||||
Files:
|
||||
mpx/
|
||||
include/mpxevents.h
|
||||
include/mpxextinit.h
|
||||
|
||||
____________________________________________________________
|
||||
xfree86: fix xf86ProcessCommonOptions() core and shared pointer assignment
|
||||
|
||||
Files:
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
|
||||
TAG: mpx-0.3.0
|
||||
|
||||
|
||||
== 18.12.06 ==
|
||||
mi: removing MPX ifdefs
|
||||
global sprite renaming in mipointer and misprite
|
||||
fixed: multiple remove cursor call in miSpriteInstallColormap
|
||||
fixed: wrong core pointer usage in miSpriteStoreColors
|
||||
|
||||
dix: bugfix in CheckCursorConfinement
|
||||
removing MPX ifdefs
|
||||
removing MPX event generation (using Xi solely now)
|
||||
bugfix GrabDevice: uninitialized field in grab struct caused segfault
|
||||
|
||||
xfree86: removing MPX fdefs
|
||||
|
||||
Xi: removing MPX protocol events
|
||||
|
||||
Files:
|
||||
include/inputstr.h
|
||||
mi/midispcur.c
|
||||
mi/mieq.c
|
||||
mi/mipointer.c
|
||||
mi/misprite.c
|
||||
dix/events.c
|
||||
dix/cursor.c
|
||||
dix/devices.c
|
||||
hw/xfree86/common/xf86Events.c
|
||||
hw/xfree86/common/xf86Input.h
|
||||
Xi/exevents.c
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
Cleaning up #ifdef MPX from remaining files, removing it from configure.ac.
|
||||
Removing building mpx extension from Makefile.am
|
||||
|
||||
Files:
|
||||
Makefile.am
|
||||
configure.ac
|
||||
hw/xfree86/ramdac/xf86HWCurs.c
|
||||
include/dix-config.h.in
|
||||
include/dix.h
|
||||
include/globals.h
|
||||
include/xorg-server.h.in
|
||||
mi/mieq.c
|
||||
mi/miinitext.c
|
||||
mi/mipointer.c
|
||||
os/utils.c
|
||||
|
||||
== 12.12.06 ==
|
||||
dix: Moving SpriteRec into DeviceIntRec
|
||||
removing global sprite structure
|
||||
beginning to remove MPX ifdefs
|
||||
|
||||
xnest: Fix to make xnest compile again
|
||||
|
||||
Files:
|
||||
dix/getevents.c
|
||||
dix/events.c
|
||||
dix/devices.c
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
include/cursor.h
|
||||
include/dix.h
|
||||
include/dixevents.h
|
||||
include/input.h
|
||||
include/inputstr.h
|
||||
XTrap/xtrapdi.c
|
||||
Xext/xtest.c
|
||||
hw/xnest/Events.c
|
||||
record/record.c
|
||||
|
||||
== 05.12.06 ==
|
||||
Xi: adding MPX checks to ProcessOtherEvents
|
||||
|
||||
mpx: adding QueryPointer request and reply
|
||||
adjusting names of requests to Xlib compatible naming (xMPX*** instead of
|
||||
mpx***)
|
||||
|
||||
|
||||
Files:
|
||||
Xi/exevents.c
|
||||
mpx/Makefile.am
|
||||
mpx/extinit.c
|
||||
mpx/getevbase.c
|
||||
mpx/getvers.c
|
||||
mpx/queryptr.c
|
||||
mpx/queryptr.h
|
||||
mpx/selectev.c
|
||||
mpx/listdev.h
|
||||
mpx/listdev.c
|
||||
include/mpxextinit.h
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
Merging from master
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
Ironing some glitches caused by the merge
|
||||
|
||||
Files:
|
||||
Xi/exevents.c
|
||||
randr/rrpointer.c
|
||||
dix/events.c
|
||||
|
||||
|
||||
== 01.12.06 ==
|
||||
|
||||
mpx: SelectEvents and GetEventBase requests.
|
||||
Some renaming and cleaning up in extinit.c
|
||||
MPXLastEvent added
|
||||
|
||||
Xi: ShouldFreeInputMask() from XI is not static any more, used in mpx
|
||||
|
||||
dix: GetPointerEvents() allocates MPX event for MPX devices.
|
||||
DeliverDeviceEvents() caters for MPX devices.
|
||||
|
||||
|
||||
Files:
|
||||
configure.ac
|
||||
mpx/Makefile.am
|
||||
mpx/extinit.c
|
||||
mpx/getvers.c
|
||||
mpx/getevbase.c
|
||||
mpx/getevbase.h
|
||||
mpx/listdev.c
|
||||
mpx/listdev.h
|
||||
mpx/mpxglobals.h
|
||||
mpx/selectev.c
|
||||
mpx/selectev.h
|
||||
mpx/mpxevents.h
|
||||
Xi/exevents.c
|
||||
dix/events.c
|
||||
dix/getevents.c
|
||||
include/mpxevents.h
|
||||
include/mpxextinit.h
|
||||
|
||||
|
||||
== 30.11.06
|
||||
mpx: Adding ListDevices request. Minor changes, using
|
||||
MPXRestoreExtensionEvents() when resetting.
|
||||
|
||||
Files:
|
||||
mpx/Makefile.am
|
||||
mpx/extinit.c
|
||||
mpx/listdev.c
|
||||
mpx/listdev.h
|
||||
mpx/mpxextinit.h
|
||||
|
||||
|
||||
== 29.11.06 ==
|
||||
mpx: Infrastructure for MPX extension, GetExtensionVersion request works.
|
||||
|
||||
Files:
|
||||
mpx/
|
||||
mpx/Makefile.am
|
||||
mpx/extinit.c
|
||||
mpx/getvers.c
|
||||
mpx/getvers.h
|
||||
mpxglobals.h
|
||||
mpx/selectev.c
|
||||
configure.ac
|
||||
Makefile.am
|
||||
os/utils.c
|
||||
mi/miinitext.c
|
||||
include/globals.h
|
||||
|
||||
== 28.11.06 ==
|
||||
mi: Bugfix: FreeCursor ignores negative refcounts.
|
||||
|
||||
mieq: Bugfix: Motion notifies did overwrite DeviceMotionNotifies
|
||||
|
||||
Files:
|
||||
dix/cursor.c
|
||||
mi/mieq.c
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
dix: missing parameter to SetCursorPosition in CheckMotion ifndef MPX
|
||||
|
||||
mi: missing include in misprite.c ifndef MPX
|
||||
|
||||
Files:
|
||||
dix/events.c
|
||||
mi/misprite.c
|
||||
|
||||
|
||||
== 27.11.06 ==
|
||||
mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case
|
||||
of errors.
|
||||
Some copyright notices.
|
||||
misprite.c passes DeviceIntPtr around and down to DC (previously
|
||||
miCursorInfoPtr and the plain device id).
|
||||
Large cleanup in misprite.c to avoid code duplication.
|
||||
|
||||
Files:
|
||||
mi/midispcur.c
|
||||
mi/misprite.c
|
||||
mi/misprite.h
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor(),
|
||||
removing IsMPDev()
|
||||
|
||||
Files:
|
||||
mi/mipointer.c
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
mi: malloc checks for misprite and midispcur, code cleanup
|
||||
removed IsMPDev()
|
||||
|
||||
Files:
|
||||
mi/misprite.c
|
||||
mi/mipointer.c
|
||||
mi/midispcur.c
|
||||
dix/events.c
|
||||
|
||||
|
||||
== 23.11.06 ==
|
||||
mi: closing memory leak, miPointer is freed in miPointerCloseScreen
|
||||
bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX
|
||||
adding DeviceIntPtr parameter to ScreenRec's cursor functions.
|
||||
cleanup of miPointer code to use same scheme in each function
|
||||
|
||||
dix: MPHasCursor() function determines checking whether to invoke
|
||||
cursor rendering.
|
||||
|
||||
animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies
|
||||
on the core pointer right now.
|
||||
|
||||
xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on
|
||||
the core pointer right now.
|
||||
|
||||
rac: adding DeviceIntPtr parameter to cursor functions but RAC relies on
|
||||
the core pointer right now.
|
||||
|
||||
ramdac: adding DeviceIntPtr parameter to cursor functions but ramdac relies on
|
||||
the core pointer right now.
|
||||
|
||||
Files:
|
||||
mi/mipointer.c
|
||||
mi/mipointer.h
|
||||
mi/micursor.c
|
||||
mi/mi.h
|
||||
mi/mieq.c
|
||||
include/cursor.h
|
||||
include/inputstr.h
|
||||
include/scrnintstr.h
|
||||
include/dix.h
|
||||
dix/events.c
|
||||
dix/cursor.c
|
||||
Xext/xtest.c
|
||||
render/animcur.c
|
||||
xfixes/cursor.c
|
||||
XTrap/xtrapddmi.c
|
||||
xkb/ddxFakeMtn.c
|
||||
hw/xfree86/common/xf86Cursor.c
|
||||
hw/xfree86/common/xf86RandR.c
|
||||
hw/xfree86/rac/xf86RAC.c
|
||||
hw/xfree86/ramdac/xf86Cursor.c
|
||||
hw/xfree86/dri/dri.c
|
||||
|
||||
|
||||
== 22.11.06 ==
|
||||
|
||||
mi: added DevToSprite() conversion function
|
||||
fixed miSpriteRealize to use passed pDev argument instead of looping.
|
||||
|
||||
dix: changed sprite dependency and added MPX functionality to parts of
|
||||
events.c (XineramaChangeToCursor, XineramaCheckPhysLimits,
|
||||
XineramaConstrainCursor)
|
||||
|
||||
Xi: fix: accessing other->buttons for keyboard segfaulted the server
|
||||
|
||||
Files:
|
||||
mi/misprite.c
|
||||
mi/mipointer.c
|
||||
dix/events.c
|
||||
Xi/exevents.c
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
dix GetSpriteWindow() adjusted for MPX
|
||||
added device dependency for MPX to DoEnterLeaveEvents,
|
||||
EnterLeaveEvents, EnterNotifies, LeaveNotifies and
|
||||
FixUpEventFromWindow.
|
||||
|
||||
Files:
|
||||
Xext/security.c
|
||||
Xi/exevents.c
|
||||
xkb/ddxFakeMtn.c
|
||||
dix/events.c
|
||||
include/dix.h
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
dix: DeliverEventsToWindow adjusted for MPX
|
||||
|
||||
mi: sprite debugging disabled
|
||||
|
||||
Files:
|
||||
dix/events.c
|
||||
Xi/exevents.c
|
||||
mi/misprite.c
|
||||
include/dix.h
|
||||
|
||||
|
||||
== 21.11.06 ==
|
||||
mi: added MPX to miSpriteReportDamage
|
||||
added id field to miCursorInfoPtr, required to pass through to miDC
|
||||
core pointer uses mpCursors array as well.
|
||||
added miDCBufferRec for future use with MPX
|
||||
|
||||
Files:
|
||||
mi/midispcur.c
|
||||
mi/misprite.c
|
||||
mi/mispritest.h
|
||||
|
||||
TAG: MPX_BEFORE_MIDC_API_BREAK
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
mi: added device ID to miSpriteCursorFuncRec functions
|
||||
added MPX code to midispcur.c
|
||||
|
||||
|
||||
Files:
|
||||
mi/midispcur.c
|
||||
mi/misprite.c
|
||||
mi/mispritest.h
|
||||
|
||||
BUG: Core pointer changes whenever MPX cursor changes shape.
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
mi: constrain MPX cursors to screen
|
||||
|
||||
Files:
|
||||
dix/events.c
|
||||
mi/mipointer.c
|
||||
include/scrnintstr.h
|
||||
|
||||
TAG: MPX_BEFORE_DIX_API_BREAK
|
||||
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
dix: moved sprite from static to be pointer of type SpritePtr
|
||||
added SpriteRecs for MPX devices
|
||||
changed sprite dependency and added MPX functionality to parts
|
||||
of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion,
|
||||
CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits,
|
||||
PointerConfinedToScreen)
|
||||
added DeviceIntRec param to GetSpritePosition(). This required some
|
||||
minor changes in ddx, xtest, xkb and xfixes.
|
||||
|
||||
mi: changed miPointer to pointer instead of static struct.
|
||||
|
||||
Files:
|
||||
dix/events.c
|
||||
dix/exevents.c
|
||||
Xext/xtest.c
|
||||
ddx/ddxFakeBtn.c
|
||||
ddx/ddxFakeMtn.c
|
||||
ddx/ddxDevBtn.c
|
||||
xkb/xkbActions.c
|
||||
xfixes/cursor.c
|
||||
mi/mieq.c
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
dix: WindowsRestructured() calls CheckMotion() on all devices
|
||||
|
||||
mi: core pointer was checked twice in miSpriteReportDamage,
|
||||
miSpriteInstallColormap, miSpriteStoreColors, miSpriteSaveDoomedAreas
|
||||
and miSpriteRealiseCursor
|
||||
using damage bug (see comment in file) to avoid artefacts
|
||||
|
||||
Files:
|
||||
dix/events.c
|
||||
mi/misprite.c
|
||||
mi/mispritest.h
|
||||
|
||||
== 20.11.06 ==
|
||||
|
||||
mi: moved core pointer information from miSpriteScreenRec into a
|
||||
miCursorInfoRec.
|
||||
bugfix in mipointer, semicolon after preprocessor statement
|
||||
|
||||
Files:
|
||||
mi/mispritest.h
|
||||
mi/misprite.c
|
||||
mi/mipointer.c
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
mi: added MPX to miSprite functions.
|
||||
|
||||
Files:
|
||||
mi/mispritest.h
|
||||
mi/misprite.c
|
||||
mi/mipointer.c
|
||||
dix/events.c
|
||||
|
||||
NOTE: This version will render multiple cursors but with an artefact each time
|
||||
when devices alternate.
|
||||
|
||||
== 17.11.06 ==
|
||||
dix: moved isMPdev field to end of _DeviceIntRec structure
|
||||
|
||||
mi:
|
||||
added miMPPointers array to mipointer.c
|
||||
added DeviceIntPtr to all miPointerSpriteFuncs. Coming from miPointer
|
||||
we use inputInfo.pointer as standard value. ABI BREAK!
|
||||
|
||||
ramdac:
|
||||
forcing failed HW Cursor initialisation. MPX needs software rendering.
|
||||
changes to use new miPointerSpriteFunc (this required externing
|
||||
inputInfo, should probably be fixed at a later point).
|
||||
|
||||
|
||||
RAC: changes to use new miPointerSpriteFuncs.
|
||||
|
||||
Files:
|
||||
include/inputstr.h
|
||||
mi/mipointer.c
|
||||
mi/mipointer.h
|
||||
mi/misprite.c
|
||||
hw/xfree86/ramdac/xf86HWCurs.c
|
||||
hw/xfree86/ramdac/xf86Cursor.c
|
||||
hw/xfree86/rac/xf86RAC.c
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
mi:
|
||||
added miCursorInfoRec to contain info of the MPX cursors.
|
||||
calling miUpdatePointerSprite() from event queue for MPX devices.
|
||||
adding device-specific processing to miPointer*() functions.
|
||||
|
||||
dix: Call to SetCursorPosition in CheckMotion() temporarily disabled.
|
||||
|
||||
xfree86/common: call to miPointerUpdateSprite() disabled, is done from the EQ
|
||||
|
||||
NOTE: This build will not display cursor images.
|
||||
BUG: The second mouse does to take correct x coordinates.
|
||||
|
||||
Files:
|
||||
mi/mispritestr.h
|
||||
mi/misprite.c
|
||||
mi/mipointer.c
|
||||
mi/mipointer.h
|
||||
mi/mieq.c
|
||||
dix/events.c
|
||||
hw/xfree86/common/xf86Events.c
|
||||
|
||||
|
||||
== 16.11.06 ==
|
||||
dix:
|
||||
merge with code cleanup from master
|
||||
GetPointerEvents treats events in the same way as XINPUT devices when flag
|
||||
has POINTER_MULTIPOINTER set.
|
||||
|
||||
xfree86/common:
|
||||
added XI86_MP_DEVICE flag and parsing in xf86ProcessCommonOptions
|
||||
added POINTER_MULTIPOINTER define. Is used in xf86PostMotionEvent and
|
||||
xf86PostButtonEvent for the flags that are passed into GetPointerEvents()
|
||||
|
||||
global:
|
||||
added flags to configure.ac to enable/disable MPX define
|
||||
added flags to dix-config.h.in to #define MPX
|
||||
|
||||
Files:
|
||||
dix/getevents.c
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
hw/xfree86/common/xf86Xinput.h
|
||||
include/input.h
|
||||
configure.ac
|
||||
include/dix-config.h.in
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents()
|
||||
|
||||
mieq: avoid merging events from different devices in mieqEnqueue()
|
||||
|
||||
xfree86/common
|
||||
isMPdev field used from xf86ActivateDevice(), xf86PostMotionEvent()
|
||||
and xf86PostButtonEvent()
|
||||
|
||||
Files:
|
||||
dix/getevents.c
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
include/inputstr.h
|
||||
mi/mieq.c
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
mieq: EQ processing handles MP devices
|
||||
|
||||
global: MPX define added to xorg-server.h.in
|
||||
|
||||
xfree86/common: small fix to avoid byte overflow
|
||||
|
||||
Files:
|
||||
mi/mieq.c
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
include/xserver-config.h.in
|
|
@ -70,6 +70,8 @@ extern int DeviceButtonStateNotify;
|
|||
extern int DeviceMappingNotify;
|
||||
extern int ChangeDeviceNotify;
|
||||
extern int DevicePresenceNotify;
|
||||
extern int DeviceEnterNotify;
|
||||
extern int DeviceLeaveNotify;
|
||||
|
||||
extern int RT_INPUTCLIENT;
|
||||
|
||||
|
|
52
Xi/extinit.c
52
Xi/extinit.c
|
@ -170,6 +170,8 @@ Mask DeviceOwnerGrabButtonMask;
|
|||
Mask DeviceButtonGrabMask;
|
||||
Mask DeviceButtonMotionMask;
|
||||
Mask DevicePresenceNotifyMask;
|
||||
Mask DeviceEnterWindowMask;
|
||||
Mask DeviceLeaveWindowMask;
|
||||
|
||||
int DeviceValuator;
|
||||
int DeviceKeyPress;
|
||||
|
@ -187,6 +189,8 @@ int DeviceButtonStateNotify;
|
|||
int DeviceMappingNotify;
|
||||
int ChangeDeviceNotify;
|
||||
int DevicePresenceNotify;
|
||||
int DeviceEnterNotify;
|
||||
int DeviceLeaveNotify;
|
||||
|
||||
int RT_INPUTCLIENT;
|
||||
|
||||
|
@ -251,6 +255,8 @@ XInputExtensionInit(void)
|
|||
EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceMappingNotify] = SEventIDispatch;
|
||||
EventSwapVector[ChangeDeviceNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceEnterNotify] = SEventIDispatch;
|
||||
EventSwapVector[DeviceLeaveNotify] = SEventIDispatch;
|
||||
} else {
|
||||
FatalError("IExtensionInit: AddExtensions failed\n");
|
||||
}
|
||||
|
@ -436,6 +442,8 @@ SProcIDispatch(register ClientPtr client)
|
|||
return (SProcXQueryDevicePointer(client));
|
||||
else if (stuff->data == X_WarpDevicePointer)
|
||||
return (SProcXWarpDevicePointer(client));
|
||||
else if (stuff->data == X_ChangeDeviceCursor)
|
||||
return (SProcXChangeDeviceCursor(client));
|
||||
else {
|
||||
SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest);
|
||||
}
|
||||
|
@ -566,6 +574,10 @@ SEventIDispatch(xEvent * from, xEvent * to)
|
|||
DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify);
|
||||
else if (type == ChangeDeviceNotify)
|
||||
DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
|
||||
else if (type == DeviceEnterNotify)
|
||||
DO_SWAP(SDeviceEnterNotifyEvent, deviceEnterNotify);
|
||||
else if (type == DeviceLeaveNotify)
|
||||
DO_SWAP(SDeviceLeaveNotifyEvent, deviceLeaveNotify);
|
||||
else {
|
||||
FatalError("XInputExtension: Impossible event!\n");
|
||||
}
|
||||
|
@ -671,6 +683,31 @@ SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to
|
|||
swaps(&to->control, n);
|
||||
}
|
||||
|
||||
void SDeviceEnterNotifyEvent (deviceEnterNotify *from, deviceEnterNotify *to)
|
||||
{
|
||||
register char n;
|
||||
|
||||
*to = *from;
|
||||
swaps(&to->sequenceNumber,n);
|
||||
swapl(&to->time, n);
|
||||
}
|
||||
|
||||
void SDeviceLeaveNotifyEvent (deviceLeaveNotify *from, deviceLeaveNotify *to)
|
||||
{
|
||||
register char n;
|
||||
|
||||
*to = *from;
|
||||
swaps(&to->sequenceNumber,n);
|
||||
swapl(&to->time, n);
|
||||
swapl(&to->root, n);
|
||||
swapl(&to->event, n);
|
||||
swapl(&to->child, n);
|
||||
swaps(&to->rootX, n);
|
||||
swaps(&to->rootY, n);
|
||||
swaps(&to->eventX, n);
|
||||
swaps(&to->eventY, n);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* This function sets up extension event types and masks.
|
||||
|
@ -698,6 +735,8 @@ FixExtensionEvents(ExtensionEntry * extEntry)
|
|||
DeviceKeyStateNotify = ChangeDeviceNotify + 1;
|
||||
DeviceButtonStateNotify = DeviceKeyStateNotify + 1;
|
||||
DevicePresenceNotify = DeviceButtonStateNotify + 1;
|
||||
DeviceEnterNotify = DevicePresenceNotify + 1;
|
||||
DeviceLeaveNotify = DeviceEnterNotify + 1;
|
||||
|
||||
event_base[KeyClass] = DeviceKeyPress;
|
||||
event_base[ButtonClass] = DeviceButtonPress;
|
||||
|
@ -773,6 +812,15 @@ FixExtensionEvents(ExtensionEntry * extEntry)
|
|||
|
||||
DevicePresenceNotifyMask = GetNextExtEventMask();
|
||||
SetEventInfo(DevicePresenceNotifyMask, _devicePresence);
|
||||
|
||||
DeviceEnterWindowMask = GetNextExtEventMask();
|
||||
SetMaskForExtEvent(DeviceEnterWindowMask, DeviceEnterNotify);
|
||||
AllowPropagateSuppress(DeviceEnterWindowMask);
|
||||
|
||||
DeviceLeaveWindowMask = GetNextExtEventMask();
|
||||
SetMaskForExtEvent(DeviceLeaveWindowMask, DeviceLeaveNotify);
|
||||
AllowPropagateSuppress(DeviceLeaveWindowMask);
|
||||
|
||||
SetEventInfo(0, _noExtensionEvent);
|
||||
}
|
||||
|
||||
|
@ -814,6 +862,8 @@ RestoreExtensionEvents(void)
|
|||
DeviceKeyStateNotify = 13;
|
||||
DeviceButtonStateNotify = 13;
|
||||
DevicePresenceNotify = 14;
|
||||
DeviceEnterNotify = 15;
|
||||
DeviceLeaveNotify = 16;
|
||||
|
||||
BadDevice = 0;
|
||||
BadEvent = 1;
|
||||
|
@ -852,6 +902,8 @@ IResetProc(ExtensionEntry * unused)
|
|||
EventSwapVector[DeviceMappingNotify] = NotImplemented;
|
||||
EventSwapVector[ChangeDeviceNotify] = NotImplemented;
|
||||
EventSwapVector[DevicePresenceNotify] = NotImplemented;
|
||||
EventSwapVector[DeviceEnterNotify] = NotImplemented;
|
||||
EventSwapVector[DeviceLeaveNotify] = NotImplemented;
|
||||
RestoreExtensionEvents();
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ ProcXQueryDevicePointer(register ClientPtr client)
|
|||
REQUEST_SIZE_MATCH(xQueryDevicePointerReq);
|
||||
|
||||
pDev = LookupDeviceIntRec(stuff->deviceid);
|
||||
if (pDev == NULL) {
|
||||
if (pDev == NULL || pDev->valuator == NULL) {
|
||||
SendErrorToClient(client, IReqCode, X_QueryDevicePointer,
|
||||
stuff->deviceid, BadDevice);
|
||||
return Success;
|
||||
|
|
31
dix/events.c
31
dix/events.c
|
@ -3329,6 +3329,10 @@ EnterLeaveEvent(
|
|||
register GrabPtr grab = mouse->grab;
|
||||
Mask mask;
|
||||
|
||||
deviceEnterNotify *devEnterLeave;
|
||||
int mskidx;
|
||||
OtherInputMasks *inputMasks;
|
||||
|
||||
if ((pWin == mouse->valuator->motionHintWindow) &&
|
||||
(detail != NotifyInferior))
|
||||
mouse->valuator->motionHintWindow = NullWindow;
|
||||
|
@ -3342,8 +3346,7 @@ EnterLeaveEvent(
|
|||
{
|
||||
mask = pWin->eventMask | wOtherEventMasks(pWin);
|
||||
}
|
||||
if (mask & filters[type])
|
||||
{
|
||||
|
||||
event.u.u.type = type;
|
||||
event.u.u.detail = detail;
|
||||
event.u.enterLeave.time = currentTime.milliseconds;
|
||||
|
@ -3369,6 +3372,9 @@ EnterLeaveEvent(
|
|||
((pWin == focus) || (focus == PointerRootWin) ||
|
||||
IsParent(focus, pWin)))
|
||||
event.u.enterLeave.flags |= ELFlagFocus;
|
||||
|
||||
if (mask & filters[type])
|
||||
{
|
||||
if (grab)
|
||||
(void)TryClientEvents(rClient(grab), &event, 1, mask,
|
||||
filters[type], grab);
|
||||
|
@ -3376,6 +3382,27 @@ EnterLeaveEvent(
|
|||
(void)DeliverEventsToWindow(pDev, pWin, &event, 1, filters[type],
|
||||
NullGrab, 0);
|
||||
}
|
||||
|
||||
devEnterLeave = (deviceEnterNotify*)&event;
|
||||
devEnterLeave->type = (type == EnterNotify) ? DeviceEnterNotify :
|
||||
DeviceLeaveNotify;
|
||||
devEnterLeave->type = (type == EnterNotify) ? DeviceEnterNotify :
|
||||
DeviceLeaveNotify;
|
||||
devEnterLeave->deviceid = pDev->id;
|
||||
mskidx = pDev->id;
|
||||
inputMasks = wOtherInputMasks(pWin);
|
||||
if (inputMasks &&
|
||||
(filters[devEnterLeave->type] & inputMasks->deliverableEvents[mskidx]))
|
||||
{
|
||||
if (grab)
|
||||
(void)TryClientEvents(rClient(grab), (xEvent*)devEnterLeave, 1,
|
||||
mask, filters[devEnterLeave->type], grab);
|
||||
else
|
||||
(void)DeliverEventsToWindow(pDev, pWin, (xEvent*)devEnterLeave,
|
||||
1, filters[devEnterLeave->type],
|
||||
NullGrab, pDev->id);
|
||||
}
|
||||
|
||||
if ((type == EnterNotify) && (mask & KeymapStateMask))
|
||||
{
|
||||
xKeymapEvent ke;
|
||||
|
|
|
@ -109,6 +109,18 @@ SDevicePresenceNotifyEvent (
|
|||
devicePresenceNotify * /* to */
|
||||
);
|
||||
|
||||
void
|
||||
SDeviceEnterNotifyEvent (
|
||||
deviceEnterNotify * /* from */,
|
||||
deviceEnterNotify * /* to */
|
||||
);
|
||||
|
||||
void
|
||||
SDeviceLeaveNotifyEvent (
|
||||
deviceLeaveNotify * /* from */,
|
||||
deviceLeaveNotify * /* to */
|
||||
);
|
||||
|
||||
void
|
||||
FixExtensionEvents (
|
||||
ExtensionEntry * /* extEntry */
|
||||
|
|
Loading…
Reference in New Issue