aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-07-12 12:09:45 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-07-12 12:09:45 +0200
commitba02470a5dea69754f31d9816d7e76f2d6893d0b (patch)
tree591f81f8c936d9814b08659502e6f9bf054a239a /nx-X11/programs
parent000a869b3e994c6f5df62bdc6ee1bb4528403c9d (diff)
parent84a403e2724ae9acac77bd1d819a9b1f4e56379a (diff)
downloadnx-libs-ba02470a5dea69754f31d9816d7e76f2d6893d0b.tar.gz
nx-libs-ba02470a5dea69754f31d9816d7e76f2d6893d0b.tar.bz2
nx-libs-ba02470a5dea69754f31d9816d7e76f2d6893d0b.zip
Merge branch 'sunweaver-pr/report-window-ids' into 3.6.x
Attributes GH PR #478: https://github.com/ArcticaProject/nx-libs/pull/478 Reviewed by Ulrich Sibiller <uli42@gmx.de> -- Mon, 10 Jul 2017 09:18:09 +0000 (UTC)
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c12
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c13
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c14
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/man/nxagent.16
5 files changed, 55 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index 5d74f212c..5c908e80b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -145,6 +145,8 @@ Bool nxagentUserDefaultDepth = False;
struct UserGeometry nxagentUserGeometry = {0, 0, 0, 0, 0};
Bool nxagentUserBorderWidth = False;
int nxagentNumScreens = 0;
+Bool nxagentReportWindowIds = False;
+Bool nxagentReportPrivateWindowIds = False;
Bool nxagentDoDirectColormaps = False;
Window nxagentParentWindow = 0;
Bool nxagentIpaq = False;
@@ -410,6 +412,16 @@ int ddxProcessArgument(int argc, char *argv[], int i)
return 1;
}
+ if (!strcmp(argv[i], "-reportwids")) {
+ nxagentReportWindowIds = True;
+ return 1;
+ }
+
+ if (!strcmp(argv[i], "-reportprivatewids")) {
+ nxagentReportPrivateWindowIds = True;
+ return 1;
+ }
+
if (!strcmp(argv[i], "-full")) {
nxagentFullGeneration = True;
return 1;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index c764f50ae..4930baee2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -198,6 +198,7 @@ unsigned long startTime;
*/
extern void RejectWellKnownSockets(void);
+extern Bool nxagentReportWindowIds;
int nxagentServerOrder()
{
@@ -1334,8 +1335,12 @@ FIXME: Use of nxagentParentWindow is strongly deprecated.
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 [%ld].\n",
+ fprintf(stderr, "nxagentOpenDisplay: Created agent's confine window with id [0x%x].\n",
nxagentConfineWindow);
#endif
@@ -2842,8 +2847,12 @@ Bool nxagentReconnectDisplay(void *p0)
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 [%ld].\n",
+ fprintf(stderr, "nxagentReconnectDisplay: Created agent's confine window with id [0x%x].\n",
nxagentConfineWindow);
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 1c3e76580..fb4ab9b19 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -139,6 +139,8 @@ extern Pixmap nxagentIconPixmap;
extern Pixmap nxagentIconShape;
extern Bool useXpmIcon;
+extern Bool nxagentReportWindowIds;
+
Window nxagentDefaultWindows[MAXSCREENS];
Window nxagentInputWindows[MAXSCREENS];
Window nxagentScreenSaverWindows[MAXSCREENS];
@@ -396,9 +398,13 @@ Window nxagentCreateIconWindow()
DefaultVisual(nxagentDisplay, DefaultScreen(nxagentDisplay)),
valuemask, &attributes);
+ if (nxagentReportWindowIds)
+ {
+ fprintf (stderr, "NXAGENT_WINDOW_ID: ICON_WINDOW,WID:[0x%x]\n", nxagentIconWindow);
+ }
#ifdef TEST
- fprintf(stderr, "nxagentCreateIconWindow: Created new icon window with id [%lu].\n",
- (long unsigned int)nxagentIconWindow);
+ fprintf(stderr, "nxagentCreateIconWindow: Created new icon window with id [0x%x].\n",
+ nxagentIconWindow);
#endif
/*
@@ -1760,9 +1766,13 @@ N/A
valuemask , &attributes);
}
+ if (nxagentReportWindowIds)
+ {
+ fprintf (stderr, "NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentInputWindows[pScreen->myNum]);
+ }
#ifdef TEST
- fprintf(stderr, "nxagentOpenScreen: Created new default window with id [%ld].\n",
- (long int)nxagentDefaultWindows[pScreen->myNum]);
+ fprintf(stderr, "nxagentOpenScreen: Created new default window with id [0x%x].\n",
+ nxagentDefaultWindows[pScreen->myNum]);
#endif
/*
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 8d2123095..4cefd3f16 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -116,6 +116,8 @@ extern WindowPtr nxagentViewportFrameBelow;
extern WindowPtr nxagentRootTileWindow;
+extern Bool nxagentReportPrivateWindowIds;
+
/*
* Also referenced in Events.c.
*/
@@ -433,8 +435,12 @@ FIXME: We need to set save under on the real display?
}
}
+ if (nxagentReportPrivateWindowIds)
+ {
+ fprintf (stderr, "NXAGENT_WINDOW_ID: PRIVATE_WINDOW,WID:[0x%x]\n", nxagentWindowPriv(pWin)->window);
+ }
#ifdef TEST
- fprintf(stderr, "nxagentCreateWindow: Created new window with id [%ld].\n",
+ fprintf(stderr, "nxagentCreateWindow: Created new window with id [0x%x].\n",
nxagentWindowPriv(pWin)->window);
#endif
@@ -3016,8 +3022,12 @@ FIXME: Do we need to set save unders attribute here?
mask,
&attributes);
+ if (nxagentReportPrivateWindowIds)
+ {
+ fprintf (stderr, "NXAGENT_WINDOW_ID: PRIVATE_WINDOW,WID:[0x%x]\n", nxagentWindowPriv(pWin)->window);
+ }
#ifdef TEST
- fprintf(stderr, "nxagentReconnectWindow: Created new window with id [%ld].\n",
+ fprintf(stderr, "nxagentReconnectWindow: Created new window with id [0x%x].\n",
nxagentWindowPriv(pWin)->window);
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
index 665a4e743..ef2d387c3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
+++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1
@@ -372,6 +372,12 @@ force use of NX protocol messages assuming communication through nxproxy
.B \-nxrealwindowprop
set property NX_REAL_WINDOW for each X11 client inside NX Agent, providing the window XID of the corresponding window object on the X server that NX Agent runs on
.TP 8
+.B \-reportwids
+explicitly tell NX Agent to report its externally exposed X11 window IDs to the session log (in machine readable form), so that external parsers can obtain that information from there
+.TP 8
+.B \-reportprivatewids
+explicitly tell NX Agent to report X11 window IDs of internally created window objects to the session log (in machine readable form), so that external parsers can obtain that information from there; this creates a lot of output and may affect performance
+.TP 8
.B \-timeout \fIint\fP
auto-disconnect timeout in seconds (minimum allowed: 60)
.TP 8