aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Events.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-05-25 19:38:14 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-06-19 01:12:02 +0200
commitcb508b2632f661e19b44f1375ddce3ffb415f4c5 (patch)
tree8e2221e23e48b4867d1a9b29547fb6b33a1624d5 /nx-X11/programs/Xserver/hw/nxagent/Events.c
parentbffdacc48a6bd49e4ac1b4ce5d2fcc8eecdb811c (diff)
downloadnx-libs-cb508b2632f661e19b44f1375ddce3ffb415f4c5.tar.gz
nx-libs-cb508b2632f661e19b44f1375ddce3ffb415f4c5.tar.bz2
nx-libs-cb508b2632f661e19b44f1375ddce3ffb415f4c5.zip
various scope improvements
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, 9 insertions, 15 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 8e976779d..9d9f5d204 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -1964,14 +1964,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was
}
case UnmapNotify:
{
- WindowPtr pWin;
-
#ifdef TEST
fprintf(stderr, "nxagentDispatchEvents: Going to handle new UnmapNotify event.\n");
#endif
if (nxagentOption(Rootless) == 1)
{
+ WindowPtr pWin;
+
if ((pWin = nxagentRootlessTopLevelWindow(X.xunmap.window)) != NULL ||
((pWin = nxagentWindowPtr(X.xunmap.window)) != NULL &&
nxagentWindowTopLevel(pWin) == 1))
@@ -1995,22 +1995,19 @@ FIXME: Don't enqueue the KeyRelease event if the key was
}
case MapNotify:
{
- WindowPtr pWin;
- ClientPtr pClient;
-
#ifdef TEST
fprintf(stderr, "nxagentDispatchEvents: Going to handle new MapNotify event.\n");
#endif
if (nxagentOption(Rootless) == 1)
{
- Bool value = 1;
+ WindowPtr pWin;
if ((pWin = nxagentRootlessTopLevelWindow(X.xmap.window)) != NULL ||
((pWin = nxagentWindowPtr(X.xmap.window)) != NULL &&
nxagentWindowTopLevel(pWin) == 1))
{
- pClient = wClient(pWin);
+ ClientPtr pClient = wClient(pWin);
nxagentScreenTrap = 1;
@@ -2021,6 +2018,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was
if (pWin != NULL)
{
+ Bool value = 1;
+
TraverseTree(pWin, nxagentChangeMapPrivate, &value);
}
}
@@ -2355,8 +2354,6 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result)
int nxagentHandlePropertyNotify(XEvent *X)
{
- int resource;
-
if (nxagentOption(Rootless) && !nxagentNotifyMatchChangeProperty((XPropertyEvent *) X))
{
#ifdef TEST
@@ -2366,7 +2363,7 @@ int nxagentHandlePropertyNotify(XEvent *X)
if (nxagentWindowPtr(X -> xproperty.window) != NULL)
{
- resource = NXGetCollectPropertyResource(nxagentDisplay);
+ int resource = NXGetCollectPropertyResource(nxagentDisplay);
if (resource == -1)
{
@@ -2643,8 +2640,6 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
{
- WindowPtr pWin;
-
*result = doNothing;
#ifdef TEST
@@ -2680,7 +2675,7 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
return 0;
}
- pWin = nxagentWindowPtr(X -> xclient.window);
+ WindowPtr pWin = nxagentWindowPtr(X -> xclient.window);
if (pWin == NULL)
{
@@ -2886,7 +2881,6 @@ int nxagentHandleXkbKeyboardStateEvent(XEvent *X)
int nxagentHandleXFixesSelectionNotify(XEvent *X)
{
- int i;
Atom local;
XFixesSelectionEvent *xfixesEvent = (XFixesSelectionEvent *) X;
@@ -2915,7 +2909,7 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X)
if (SelectionCallback)
{
- i = 0;
+ int i = 0;
while ((i < NumCurrentSelections) &&
CurrentSelections[i].selection != local)