diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-08-22 15:35:49 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-08-22 15:35:49 +0200 |
commit | 9f4eb6a0bbfc2035bb096d5cbcdf27afb50363d7 (patch) | |
tree | 455941dd589ae349e522ec9d3883b8e0f454d4d0 /nx-X11/programs/Xserver/hw/nxagent/Events.c | |
parent | c0bef5e3962e7f2f056ff7c4b0798099ac867293 (diff) | |
parent | 129d1cc910227717ec113a9008693afb741047ab (diff) | |
download | nx-libs-9f4eb6a0bbfc2035bb096d5cbcdf27afb50363d7.tar.gz nx-libs-9f4eb6a0bbfc2035bb096d5cbcdf27afb50363d7.tar.bz2 nx-libs-9f4eb6a0bbfc2035bb096d5cbcdf27afb50363d7.zip |
Merge branch 'uli42-pr/refactor_defaulteventmask' into 3.6.x
Attributes GH PR #692: https://github.com/ArcticaProject/nx-libs/pull/692
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Events.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 24 |
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; |