Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
a6603778
Commit
a6603778
authored
May 05, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Nov 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXevents.c: call upstream versions of (De)ActivatePointerGrab()
parent
bdcb5a18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
48 deletions
+15
-48
events.c
nx-X11/programs/Xserver/dix/events.c
+10
-3
NXevents.c
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+5
-45
No files found.
nx-X11/programs/Xserver/dix/events.c
View file @
a6603778
...
@@ -1216,10 +1216,14 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
...
@@ -1216,10 +1216,14 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
ComputeFreezes
();
ComputeFreezes
();
}
}
#ifndef NXAGENT_SERVER
void
void
ActivatePointerGrab
(
register
DeviceIntPtr
mouse
,
register
GrabPtr
grab
,
#ifdef NXAGENT_SERVER
xorg_ActivatePointerGrab
(
register
DeviceIntPtr
mouse
,
register
GrabPtr
grab
,
TimeStamp
time
,
Bool
autoGrab
)
#else
ActivatePointerGrab
(
register
DeviceIntPtr
mouse
,
register
GrabPtr
grab
,
TimeStamp
time
,
Bool
autoGrab
)
TimeStamp
time
,
Bool
autoGrab
)
#endif
{
{
WindowPtr
oldWin
=
(
mouse
->
grab
)
?
mouse
->
grab
->
window
WindowPtr
oldWin
=
(
mouse
->
grab
)
?
mouse
->
grab
->
window
:
sprite
.
win
;
:
sprite
.
win
;
...
@@ -1246,7 +1250,11 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
...
@@ -1246,7 +1250,11 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
}
}
void
void
#ifdef NXAGENT_SERVER
xorg_DeactivatePointerGrab
(
register
DeviceIntPtr
mouse
)
#else
DeactivatePointerGrab
(
register
DeviceIntPtr
mouse
)
DeactivatePointerGrab
(
register
DeviceIntPtr
mouse
)
#endif
{
{
register
GrabPtr
grab
=
mouse
->
grab
;
register
GrabPtr
grab
=
mouse
->
grab
;
register
DeviceIntPtr
dev
;
register
DeviceIntPtr
dev
;
...
@@ -1268,7 +1276,6 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
...
@@ -1268,7 +1276,6 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
FreeCursor
(
grab
->
cursor
,
(
Cursor
)
0
);
FreeCursor
(
grab
->
cursor
,
(
Cursor
)
0
);
ComputeFreezes
();
ComputeFreezes
();
}
}
#endif
/* NXAGENT_SERVER */
void
void
ActivateKeyboardGrab
(
register
DeviceIntPtr
keybd
,
GrabPtr
grab
,
TimeStamp
time
,
Bool
passive
)
ActivateKeyboardGrab
(
register
DeviceIntPtr
keybd
,
GrabPtr
grab
,
TimeStamp
time
,
Bool
passive
)
...
...
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
View file @
a6603778
...
@@ -161,28 +161,7 @@ void
...
@@ -161,28 +161,7 @@ void
ActivatePointerGrab
(
register
DeviceIntPtr
mouse
,
register
GrabPtr
grab
,
ActivatePointerGrab
(
register
DeviceIntPtr
mouse
,
register
GrabPtr
grab
,
TimeStamp
time
,
Bool
autoGrab
)
TimeStamp
time
,
Bool
autoGrab
)
{
{
WindowPtr
oldWin
=
(
mouse
->
grab
)
?
mouse
->
grab
->
window
xorg_ActivatePointerGrab
(
mouse
,
grab
,
time
,
autoGrab
);
:
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
);
#ifdef NXAGENT_SERVER
#ifdef NXAGENT_SERVER
...
@@ -212,9 +191,8 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
...
@@ -212,9 +191,8 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
if
(
nxagentOption
(
Rootless
)
==
1
)
if
(
nxagentOption
(
Rootless
)
==
1
)
{
{
/*
/*
* FIXME: We should use the correct value
* FIXME: We should use the correct value for the
* for the cursor. Temporarily we set it
* cursor. Temporarily we set it to None.
* to None.
*/
*/
int
resource
=
nxagentWaitForResource
(
NXGetCollectGrabPointerResource
,
int
resource
=
nxagentWaitForResource
(
NXGetCollectGrabPointerResource
,
...
@@ -227,31 +205,13 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
...
@@ -227,31 +205,13 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
None
,
CurrentTime
);
None
,
CurrentTime
);
}
}
#endif
#endif
/* NXAGENT_SERVER */
}
}
void
void
DeactivatePointerGrab
(
register
DeviceIntPtr
mouse
)
DeactivatePointerGrab
(
register
DeviceIntPtr
mouse
)
{
{
register
GrabPtr
grab
=
mouse
->
grab
;
xorg_DeactivatePointerGrab
(
mouse
);
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
();
#ifdef NXAGENT_SERVER
#ifdef NXAGENT_SERVER
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment