aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-05-05 16:14:26 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-01 16:36:24 +0100
commita6603778643168e766e142b2e77040bdfac3d710 (patch)
treed09915f4b2cc5c61313aebb40351937ff66d1017 /nx-X11/programs/Xserver/hw
parentbdcb5a188db8f472809ca25077145516daf582d5 (diff)
downloadnx-libs-a6603778643168e766e142b2e77040bdfac3d710.tar.gz
nx-libs-a6603778643168e766e142b2e77040bdfac3d710.tar.bz2
nx-libs-a6603778643168e766e142b2e77040bdfac3d710.zip
NXevents.c: call upstream versions of (De)ActivatePointerGrab()
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c50
1 files changed, 5 insertions, 45 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 031e62431..377843407 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -161,28 +161,7 @@ void
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
TimeStamp time, Bool autoGrab)
{
- WindowPtr oldWin = (mouse->grab) ? mouse->grab->window
- : sprite.win;
-
- if (grab->confineTo)
- {
- if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen)
- sprite.hotPhys.x = sprite.hotPhys.y = 0;
- ConfineCursorToWindow(grab->confineTo, FALSE, TRUE);
- }
- DoEnterLeaveEvents(oldWin, grab->window, NotifyGrab);
- mouse->valuator->motionHintWindow = NullWindow;
- if (syncEvents.playingEvents)
- mouse->grabTime = syncEvents.time;
- else
- mouse->grabTime = time;
- if (grab->cursor)
- grab->cursor->refcnt++;
- mouse->activeGrab = *grab;
- mouse->grab = &mouse->activeGrab;
- mouse->fromPassiveGrab = autoGrab;
- PostNewCursor();
- CheckGrabForSyncs(mouse,(Bool)grab->pointerMode, (Bool)grab->keyboardMode);
+ xorg_ActivatePointerGrab(mouse, grab, time, autoGrab);
#ifdef NXAGENT_SERVER
@@ -212,9 +191,8 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
if (nxagentOption(Rootless) == 1)
{
/*
- * FIXME: We should use the correct value
- * for the cursor. Temporarily we set it
- * to None.
+ * FIXME: We should use the correct value for the
+ * cursor. Temporarily we set it to None.
*/
int resource = nxagentWaitForResource(NXGetCollectGrabPointerResource,
@@ -227,31 +205,13 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
None, CurrentTime);
}
- #endif
+ #endif /* NXAGENT_SERVER */
}
void
DeactivatePointerGrab(register DeviceIntPtr mouse)
{
- register GrabPtr grab = mouse->grab;
- register DeviceIntPtr dev;
-
- mouse->valuator->motionHintWindow = NullWindow;
- mouse->grab = NullGrab;
- mouse->sync.state = NOT_GRABBED;
- mouse->fromPassiveGrab = FALSE;
- for (dev = inputInfo.devices; dev; dev = dev->next)
- {
- if (dev->sync.other == grab)
- dev->sync.other = NullGrab;
- }
- DoEnterLeaveEvents(grab->window, sprite.win, NotifyUngrab);
- if (grab->confineTo)
- ConfineCursorToWindow(ROOT, FALSE, FALSE);
- PostNewCursor();
- if (grab->cursor)
- FreeCursor(grab->cursor, (Cursor)0);
- ComputeFreezes();
+ xorg_DeactivatePointerGrab(mouse);
#ifdef NXAGENT_SERVER