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

nxagent: add names to some windows in DEBUG mode

parent 210db316
......@@ -1125,6 +1125,18 @@ void nxagentOpenConfineWindow(void)
nxagentConfineWindow);
}
#ifdef DEBUG
{
char *winname = NULL;
if (-1 != asprintf(&winname, "%s Confine", nxagentWindowName))
{
Xutf8SetWMProperties(nxagentDisplay, nxagentConfineWindow,
winname, winname, NULL , 0 , NULL, NULL, NULL);
SAFE_free(winname);
}
}
#endif
#ifdef TEST
fprintf(stderr, "%s: Created agent's confine window with id [0x%x].\n", __func__, nxagentConfineWindow);
#endif
......
......@@ -466,10 +466,24 @@ Window nxagentCreateIconWindow(void)
}
}
char *winname = NULL;
#ifdef DEBUG
if (-1 == asprintf(&winname, "%s Icon", nxagentWindowName))
{
/* If memory allocation wasn't possible, or some other error
occurs, these functions will return -1, and the contents of
winname are undefined. */
winname = NULL;
}
#endif
Xutf8SetWMProperties(nxagentDisplay, w,
nxagentWindowName, nxagentWindowName,
winname ? winname : nxagentWindowName,
winname ? winname : nxagentWindowName,
NULL , 0 , sizeHints, wmHints, NULL);
SAFE_free(winname);
SAFE_XFree(sizeHints);
SAFE_XFree(wmHints);
......@@ -1768,6 +1782,18 @@ N/A
fprintf(stderr, "NXAGENT_WINDOW_ID: INPUT_WINDOW:[%d],WID:[0x%x]\n", pScreen->myNum, nxagentInputWindows[pScreen->myNum]);
}
#ifdef DEBUG
{
char *winname = NULL;
if (-1 != asprintf(&winname, "%s Input", nxagentWindowName))
{
Xutf8SetWMProperties(nxagentDisplay, nxagentInputWindows[pScreen->myNum],
winname, winname, NULL , 0 , NULL, NULL, NULL);
SAFE_free(winname);
}
}
#endif
#ifdef TEST
fprintf(stderr, "nxagentOpenScreen: Created new input window for screen [%d] with id [0x%x].\n",
pScreen->myNum, nxagentInputWindows[pScreen->myNum]);
......@@ -1873,12 +1899,25 @@ N/A
}
}
char *winname = NULL;
#ifdef DEBUG
if (-1 == asprintf(&winname, "%s Default[%d]", nxagentWindowName, pScreen->myNum))
{
/* If memory allocation wasn't possible, or some other error
occurs, these functions will return -1, and the contents of
winname are undefined. */
winname = NULL;
}
#endif
Xutf8SetWMProperties(nxagentDisplay,
nxagentDefaultWindows[pScreen->myNum],
nxagentWindowName,
nxagentWindowName,
winname ? winname : nxagentWindowName,
winname ? winname : nxagentWindowName,
argv , argc , sizeHints, wmHints, NULL);
SAFE_free(winname);
SAFE_XFree(sizeHints);
SAFE_XFree(wmHints);
......
......@@ -403,6 +403,19 @@ Bool nxagentCreateWindow(WindowPtr pWin)
{
fprintf(stderr, "NXAGENT_WINDOW_ID: PRIVATE_WINDOW,WID:[0x%x],INT:[0x%x]\n", nxagentWindowPriv(pWin)->window, pWin->drawable.id);
}
#ifdef DEBUG
{
char *winname = NULL;
if (-1 != asprintf(&winname, "%s Private[0x%lx]", nxagentWindowName, pWin->drawable.id))
{
Xutf8SetWMProperties(nxagentDisplay, nxagentWindowPriv(pWin)->window,
winname, winname, NULL , 0 , NULL, NULL, NULL);
SAFE_free(winname);
}
}
#endif
#ifdef TEST
fprintf(stderr, "nxagentCreateWindow: Created new window with id [0x%x].\n",
nxagentWindowPriv(pWin)->window);
......@@ -2995,6 +3008,19 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
{
fprintf(stderr, "NXAGENT_WINDOW_ID: PRIVATE_WINDOW,WID:[0x%x],INT:[0x%x]\n", nxagentWindowPriv(pWin)->window, pWin->drawable.id);
}
#ifdef DEBUG
{
char *winname = NULL;
if (-1 != asprintf(&winname, "%s Private[0x%lx]", nxagentWindowName, pWin->drawable.id))
{
Xutf8SetWMProperties(nxagentDisplay, nxagentWindowPriv(pWin)->window,
winname, winname, NULL , 0 , NULL, NULL, NULL);
SAFE_free(winname);
}
}
#endif
#ifdef TEST
fprintf(stderr, "nxagentReconnectWindow: Created new window with id [0x%x].\n",
nxagentWindowPriv(pWin)->window);
......
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