From 39bf8d9d723c7e1fe39694e9d0da164692bcbdf9 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 9 Jan 2020 00:13:23 +0100 Subject: Rootless.c: undo overzealous scope improvement It is better to create the values array once and not on every iteration.. --- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nx-X11/programs') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index 2adb254f6..77843b851 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -332,17 +332,17 @@ void nxagentRootlessRestack(unsigned long children[], unsigned int nchildren) WindowPtr pWin = screenInfo.screens[0]->root -> firstChild; + XID values[2] = {0, (XID) Above}; + for (int i = ntoplevel; i-- && pWin; pWin = toplevel[i] -> nextSib) { - XID values[2] = {0, (XID) Above}; - if (toplevel[i] != pWin) { Mask mask = CWSibling | CWStackMode; values[0] = pWin -> drawable.id; ClientPtr pClient = wClient(toplevel[i]); nxagentScreenTrap = 1; - ConfigureWindow(toplevel[i], mask, (XID *) values, pClient); + ConfigureWindow(toplevel[i], mask, values, pClient); nxagentScreenTrap = 0; #ifdef TEST -- cgit v1.2.3