Commit f534a486 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Screen.c: move attributes/valuemask to inner scopes

parent d7a091a6
...@@ -844,8 +844,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, ...@@ -844,8 +844,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
DepthPtr depths; DepthPtr depths;
int numVisuals, numDepths; int numVisuals, numDepths;
int depthIndex; int depthIndex;
unsigned long valuemask;
XSetWindowAttributes attributes;
Bool resetAgentPosition = False; Bool resetAgentPosition = False;
VisualID defaultVisual; VisualID defaultVisual;
...@@ -1678,15 +1676,16 @@ N/A ...@@ -1678,15 +1676,16 @@ N/A
if (nxagentDoFullGeneration == 1 || if (nxagentDoFullGeneration == 1 ||
nxagentReconnectTrap == 1) nxagentReconnectTrap == 1)
{ {
valuemask = CWBackPixel | CWEventMask | CWColormap | unsigned long valuemask = CWBackPixel | CWEventMask | CWColormap;
(nxagentOption(AllScreens) == 1 ? CWOverrideRedirect : 0); XSetWindowAttributes attributes = {
.background_pixel = nxagentBlackPixel,
attributes.background_pixel = nxagentBlackPixel; .event_mask = nxagentGetDefaultEventMask(),
attributes.event_mask = nxagentGetDefaultEventMask(); .colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen))
attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen)); };
if (nxagentOption(AllScreens) == 1) if (nxagentOption(AllScreens) == 1)
{ {
valuemask |= CWOverrideRedirect;
attributes.override_redirect = True; attributes.override_redirect = True;
} }
...@@ -1753,8 +1752,7 @@ N/A ...@@ -1753,8 +1752,7 @@ N/A
if (nxagentOption(Rootless) == 0) if (nxagentOption(Rootless) == 0)
{ {
valuemask = CWEventMask; XSetWindowAttributes inpattributes = {.event_mask = PointerMotionMask};
attributes.event_mask = PointerMotionMask;
nxagentInputWindows[pScreen->myNum] = nxagentInputWindows[pScreen->myNum] =
XCreateWindow(nxagentDisplay, XCreateWindow(nxagentDisplay,
...@@ -1764,7 +1762,7 @@ N/A ...@@ -1764,7 +1762,7 @@ N/A
nxagentOption(Height), nxagentOption(Height),
0, 0, InputOnly, 0, 0, InputOnly,
nxagentDefaultVisual(pScreen), nxagentDefaultVisual(pScreen),
valuemask , &attributes); CWEventMask, &inpattributes);
if (nxagentReportWindowIds) if (nxagentReportWindowIds)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment