aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Events.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-05-10 00:29:21 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-08-22 15:34:18 +0200
commit129d1cc910227717ec113a9008693afb741047ab (patch)
tree455941dd589ae349e522ec9d3883b8e0f454d4d0 /nx-X11/programs/Xserver/hw/nxagent/Events.c
parentc0bef5e3962e7f2f056ff7c4b0798099ac867293 (diff)
downloadnx-libs-129d1cc910227717ec113a9008693afb741047ab.tar.gz
nx-libs-129d1cc910227717ec113a9008693afb741047ab.tar.bz2
nx-libs-129d1cc910227717ec113a9008693afb741047ab.zip
refactor nxagentGet(Default)EventMask
Fixes ArcticaProject/nx-libs#691.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Events.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 0eca8e491..fad9f2865 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -734,9 +734,9 @@ void nxagentInitDefaultEventMask(void)
defaultEventMask = mask;
}
-void nxagentGetDefaultEventMask(Mask *mask_return)
+Mask nxagentGetDefaultEventMask(void)
{
- *mask_return = defaultEventMask;
+ return defaultEventMask;
}
void nxagentSetDefaultEventMask(Mask mask)
@@ -744,7 +744,7 @@ void nxagentSetDefaultEventMask(Mask mask)
defaultEventMask = mask;
}
-void nxagentGetEventMask(WindowPtr pWin, Mask *mask_return)
+Mask nxagentGetEventMask(WindowPtr pWin)
{
Mask mask = NoEventMask;
@@ -774,7 +774,7 @@ void nxagentGetEventMask(WindowPtr pWin, Mask *mask_return)
mask = ExposureMask | VisibilityChangeMask;
}
- *mask_return = mask;
+ return mask;
}
static int nxagentChangeMapPrivate(WindowPtr pWin, void * ptr)
@@ -3729,9 +3729,7 @@ int nxagentHandleReparentNotify(XEvent* X)
void nxagentEnableKeyboardEvents(void)
{
int i;
- Mask mask;
-
- nxagentGetDefaultEventMask(&mask);
+ Mask mask = nxagentGetDefaultEventMask();
mask |= NXAGENT_KEYBOARD_EVENT_MASK;
@@ -3750,9 +3748,7 @@ void nxagentEnableKeyboardEvents(void)
void nxagentDisableKeyboardEvents(void)
{
int i;
- Mask mask;
-
- nxagentGetDefaultEventMask(&mask);
+ Mask mask = nxagentGetDefaultEventMask();
mask &= ~NXAGENT_KEYBOARD_EVENT_MASK;
@@ -3769,9 +3765,7 @@ void nxagentDisableKeyboardEvents(void)
void nxagentEnablePointerEvents(void)
{
int i;
- Mask mask;
-
- nxagentGetDefaultEventMask(&mask);
+ Mask mask = nxagentGetDefaultEventMask();
mask |= NXAGENT_POINTER_EVENT_MASK;
@@ -3786,9 +3780,7 @@ void nxagentEnablePointerEvents(void)
void nxagentDisablePointerEvents(void)
{
int i;
- Mask mask;
-
- nxagentGetDefaultEventMask(&mask);
+ Mask mask = nxagentGetDefaultEventMask();
mask &= ~NXAGENT_POINTER_EVENT_MASK;