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

Display.c: factor out confinement window creation

parent 0f8ed4d1
...@@ -1105,6 +1105,28 @@ void nxagentResetSignalHandlers(void) ...@@ -1105,6 +1105,28 @@ void nxagentResetSignalHandlers(void)
nxagentInitTimer(); nxagentInitTimer();
} }
/*
* currently unused it seems
*/
void nxagentOpenConfineWindow(void)
{
nxagentConfineWindow = XCreateWindow(nxagentDisplay,
DefaultRootWindow(nxagentDisplay),
0, 0, 1, 1, 0, 0,
InputOnly,
CopyFromParent,
0L, NULL);
if (nxagentReportWindowIds) {
fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
nxagentConfineWindow);
}
#ifdef TEST
fprintf(stderr, "%s: Created agent's confine window with id [0x%x].\n", __func__, nxagentConfineWindow);
#endif
}
void nxagentOpenDisplay(int argc, char *argv[]) void nxagentOpenDisplay(int argc, char *argv[])
{ {
if (!nxagentDoFullGeneration) if (!nxagentDoFullGeneration)
...@@ -1298,21 +1320,7 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. We need ...@@ -1298,21 +1320,7 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. We need
fprintf(stderr, "nxagentOpenDisplay: Going to create agent's confine window.\n"); fprintf(stderr, "nxagentOpenDisplay: Going to create agent's confine window.\n");
#endif #endif
nxagentConfineWindow = XCreateWindow(nxagentDisplay, nxagentOpenConfineWindow();
DefaultRootWindow(nxagentDisplay),
0, 0, 1, 1, 0, 0,
InputOnly,
CopyFromParent,
0L, NULL);
if (nxagentReportWindowIds) {
fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
nxagentConfineWindow);
}
#ifdef TEST
fprintf(stderr, "nxagentOpenDisplay: Created agent's confine window with id [0x%x].\n",
nxagentConfineWindow);
#endif
if (!(nxagentUserGeometry.flag & XValue)) if (!(nxagentUserGeometry.flag & XValue))
{ {
...@@ -2665,21 +2673,7 @@ Bool nxagentReconnectDisplay(void *p0) ...@@ -2665,21 +2673,7 @@ Bool nxagentReconnectDisplay(void *p0)
fprintf(stderr, "nxagentReconnectDisplay: Going to create agent's confine window.\n"); fprintf(stderr, "nxagentReconnectDisplay: Going to create agent's confine window.\n");
#endif #endif
nxagentConfineWindow = XCreateWindow(nxagentDisplay, nxagentOpenConfineWindow();
DefaultRootWindow(nxagentDisplay),
0, 0, 1, 1, 0, 0,
InputOnly,
CopyFromParent,
0L, NULL);
if (nxagentReportWindowIds) {
fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
nxagentConfineWindow);
}
#ifdef TEST
fprintf(stderr, "nxagentReconnectDisplay: Created agent's confine window with id [0x%x].\n",
nxagentConfineWindow);
#endif
useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape); useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape);
......
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