diff options
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 24 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.h | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Screen.c | 17 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Window.c | 15 |
4 files changed, 19 insertions, 41 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; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h index 5175be1ce..c0eb8780b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h @@ -88,9 +88,9 @@ extern void nxagentDisablePointerEvents(void); */ extern void nxagentInitDefaultEventMask(void); -extern void nxagentGetDefaultEventMask(Mask *mask_return); +extern Mask nxagentGetDefaultEventMask(void); extern void nxagentSetDefaultEventMask(Mask mask); -extern void nxagentGetEventMask(WindowPtr pWin, Mask *mask_return); +extern Mask nxagentGetEventMask(WindowPtr pWin); /* * Bring keyboard device in known state. It needs diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index b7a8f5404..11efbf359 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -455,7 +455,7 @@ Window nxagentCreateIconWindow(void) * Enable events from the icon window. */ - nxagentGetDefaultEventMask(&mask); + mask = nxagentGetDefaultEventMask(); XSelectInput(nxagentDisplay, w, (mask & ~(KeyPressMask | KeyReleaseMask)) | StructureNotifyMask); @@ -1705,12 +1705,7 @@ N/A (nxagentOption(AllScreens) == 1 ? CWOverrideRedirect : 0); attributes.background_pixel = nxagentBlackPixel; - - /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ - Mask tmp_mask = attributes.event_mask; - nxagentGetDefaultEventMask(&tmp_mask); - attributes.event_mask = (int)tmp_mask; - + attributes.event_mask = nxagentGetDefaultEventMask(); attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen)); if (nxagentOption(AllScreens) == 1) @@ -1741,7 +1736,7 @@ N/A { nxagentDefaultWindows[pScreen->myNum] = nxagentParentWindow; - nxagentGetDefaultEventMask(&mask); + mask = nxagentGetDefaultEventMask(); XSelectInput(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], mask); } @@ -1870,7 +1865,7 @@ N/A strlen("X-AGENT")); } - nxagentGetDefaultEventMask(&mask); + mask = nxagentGetDefaultEventMask(); XSelectInput(nxagentDisplay, nxagentFullscreenWindow, mask); } @@ -2940,7 +2935,7 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width, mask = CWBackPixmap | CWEventMask | CWCursor; - nxagentGetDefaultEventMask(&maskb); + maskb = nxagentGetDefaultEventMask(); maskb |= ResizeRedirectMask | ExposureMask; vlist = values; @@ -3597,7 +3592,7 @@ Bool nxagentReconnectScreen(void *p0) h, 1))); - nxagentGetDefaultEventMask(&mask); + mask = nxagentGetDefaultEventMask(); mask |= NXAGENT_KEYBOARD_EVENT_MASK | NXAGENT_POINTER_EVENT_MASK; nxagentSetDefaultEventMask(mask); XSelectInput(nxagentDisplay, nxagentDefaultWindows[0], mask); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index b12fe76de..5373d4889 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -345,10 +345,7 @@ FIXME: We need to set save under on the real display? if (mask & CWEventMask) { - /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ - Mask tmp_mask = attributes.event_mask; - nxagentGetEventMask(pWin, &tmp_mask); - attributes.event_mask = (int)tmp_mask; + attributes.event_mask = nxagentGetEventMask(pWin); } #ifdef WARNING else @@ -2970,10 +2967,7 @@ FIXME: Do we need to set save unders attribute here? if (mask & CWEventMask) { - /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ - Mask tmp_mask = attributes.event_mask; - nxagentGetEventMask(pWin, &tmp_mask); - attributes.event_mask = (int)tmp_mask; + attributes.event_mask = nxagentGetEventMask(pWin); } #ifdef WARNING else @@ -3446,10 +3440,7 @@ void nxagentSetTopLevelEventMask(pWin) if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) { - /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */ - Mask tmp_mask = attributes.event_mask = NoEventMask; - nxagentGetEventMask(pWin, &tmp_mask); - attributes.event_mask = (int)tmp_mask; + attributes.event_mask = nxagentGetEventMask(pWin); XChangeWindowAttributes(nxagentDisplay, nxagentWindow(pWin), mask, &attributes); } |