diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-01-06 00:53:06 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-01-06 00:53:06 +0100 |
commit | 67599026d01692c52276df6ff5e8332d2413c18f (patch) | |
tree | b93b8d6643dd6438f0844d48008d6cb9ffee405f /nx-X11/programs/Xserver/hw/nxagent/Events.c | |
parent | 5a8f1e921b4cafedc9efac22d5fbd2ce05e45ba9 (diff) | |
parent | cf8797c3c0e9623e5092a2c9f5ea7cb31bc11657 (diff) | |
download | nx-libs-67599026d01692c52276df6ff5e8332d2413c18f.tar.gz nx-libs-67599026d01692c52276df6ff5e8332d2413c18f.tar.bz2 nx-libs-67599026d01692c52276df6ff5e8332d2413c18f.zip |
Merge branch 'uli42-pr/various3' into 3.6.x
Attributes GH PR #880: https://github.com/ArcticaProject/nx-libs/pull/880
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Events.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index b9d3a9238..597359cf1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2197,7 +2197,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already { if (nxagentOption(AllScreens) == 0 && nxagentOption(Fullscreen) == 1) { - nxagentSwitchFullscreen(pScreen, 0); + nxagentSwitchFullscreen(pScreen, False); } else { @@ -2578,11 +2578,6 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) { *result = doNothing; - #ifdef TEST - fprintf(stderr, "%s: ClientMessage event window [%ld] with type [%ld] format [%d].\n", - __func__, X -> xclient.window, X -> xclient.message_type, X -> xclient.format); - #endif - /* * If window is 0, message_type is 0 and format is 32 then we assume * event is coming from proxy. @@ -2592,11 +2587,25 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) X -> xclient.message_type == 0 && X -> xclient.format == 32) { + #ifdef TEST + fprintf(stderr, "%s: got nxproxy event\n", __func__); + #endif nxagentHandleProxyEvent(X); return 1; } + #ifdef TEST + char * name = XGetAtomName(nxagentDisplay, X -> xclient.message_type); + fprintf(stderr, "nxagentHandleClientMessageEvent: ClientMessage event window [0x%lx] with " + "message_type [%ld][%s] format [%d] type [%d] source_indication [%ld][%s] timestamp [%ld] " + "curwin [0x%lx].\n", X -> xclient.window, X -> xclient.message_type, name, + X -> xclient.format, X -> xclient.type, X -> xclient.data.l[0], + X -> xclient.data.l[0] == 1 ? "'application'" : X -> xclient.data.l[0] == 1 ? "'pager'" : "'none (old spec)'", + X -> xclient.data.l[1], X -> xclient.data.l[2]); + SAFE_XFree(name); + #endif + if (nxagentOption(Rootless)) { Atom message_type = nxagentRemoteToLocalAtom(X -> xclient.message_type); @@ -2611,11 +2620,20 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) } WindowPtr pWin = nxagentWindowPtr(X -> xclient.window); - if (pWin == NULL) { + /* + * If some window on the real X server sends a + * _NET_ACTIVE_WINDOW ClientMessage to indicate the active + * window that window will be one not belonging to nxagent so + * this situation is perfectly legal. For all other situations + * we print a warning. + */ #ifdef WARNING - fprintf(stderr, "WARNING: Invalid window in ClientMessage.\n"); + if (message_type != MakeAtom("_NET_ACTIVE_WINDOW", strlen("_NET_ACTIVE_WINDOW"), False)) + { + fprintf(stderr, "WARNING: Invalid window in ClientMessage xclient.window [0x%lx].\n", X->xclient.window); + } #endif return 0; |