diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-02-21 10:39:46 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2018-02-26 01:07:46 +0100 |
commit | 8d00456ad3e7b7a49d8fadb269334589e3704758 (patch) | |
tree | f94c76301d393c9e232a0d7d3f6d6f43373f8c56 | |
parent | 05152b788ab184f45df1f64182791c88a09dc6f9 (diff) | |
download | nx-libs-8d00456ad3e7b7a49d8fadb269334589e3704758.tar.gz nx-libs-8d00456ad3e7b7a49d8fadb269334589e3704758.tar.bz2 nx-libs-8d00456ad3e7b7a49d8fadb269334589e3704758.zip |
nxagent: Add support for optionally enabling/disabling the magic pixel feature.
Fixes ArcticaProject/nx-libs#657.
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Args.c | 18 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Options.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Options.h | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 7 | ||||
-rw-r--r-- | nxcomp/src/Loop.cpp | 3 | ||||
-rw-r--r-- | nxcomp/src/Misc.cpp | 1 | ||||
-rw-r--r-- | nxproxy/man/nxproxy.1 | 1 |
8 files changed, 38 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 14f696e2d..604b33187 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -676,6 +676,10 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 1; } + if (!strcmp(argv[i], "-nomagicpixel")) { + nxagentChangeOption(MagicPixel, 0); + return 1; + } if (!strcmp(argv[i], "-noonce")) { @@ -1246,6 +1250,19 @@ static void nxagentParseOptions(char *name, char *value) return; } + else if (!strcmp(name, "magicpixel")) + { + if (!strcmp(value, "0")) + { + nxagentChangeOption(MagicPixel, 0); + } + else + { + nxagentChangeOption(MagicPixel, 1); + } + + return; + } else if (strcmp(name, "shadowuid") == 0) { nxagentShadowUid = atoi(value); @@ -2075,6 +2092,7 @@ void ddxUseMsg() ErrorF("-forcenx force use of NX protocol messages assuming communication through nxproxy\n"); ErrorF("-timeout int auto-disconnect timeout in seconds (minimum allowed: 60)\n"); ErrorF("-norootlessexit don't exit if there are no clients in rootless mode\n"); + ErrorF("-nomagicpixel disable nxagent's magic pixel\n"); #ifdef RENDER ErrorF("-norender disable the use of the render extension\n"); ErrorF("-nocomposite disable the use of the composite extension\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 315b6572e..8681ab270 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1218,7 +1218,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was if (nxagentOption(Fullscreen)) { - if (nxagentMagicPixelZone(X.xbutton.x, X.xbutton.y)) + if ( (nxagentOption(MagicPixel) == 1) && (nxagentMagicPixelZone(X.xbutton.x, X.xbutton.y)) ) { pScreen = nxagentScreen(X.xbutton.window); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c index 3464fdb10..dba54a6c6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c @@ -155,6 +155,8 @@ void nxagentInitOptions() nxagentOptions.Menu = 1; + nxagentOptions.MagicPixel = 1; + nxagentOptions.ClientOs = UNDEFINED; nxagentOptions.InhibitXkb = 1; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h index 95b0642e1..a4e2c5099 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h @@ -386,6 +386,12 @@ typedef struct _AgentOptions int Menu; /* + * Enabling/disabling the magic pixel. + */ + + int MagicPixel; + + /* * Specify the Operative System of the client. */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 124f08743..1c0fe5fa4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -399,6 +399,10 @@ auto-disconnect timeout in seconds (minimum allowed: 60) .B \-norootlessexit don't exit if there are no clients in rootless mode .TP 8 +.B \-nomagicpixel +disable magic pixel support at session startup, can be re-enabled via nx/nx option on session +resumption +.TP 8 .B \-norender disable the use of the render extension .TP 8 @@ -599,6 +603,9 @@ overrides the command line default. support pulldown menu in \fBnxagent\fR session (only available on proxy <-> agent remote sessions) .TP 8 +.B magicpixel=<int> +enable/disable magic pixel support in fullscreen mode (default: 1, enabled) +.TP 8 .B sleep=<int> delay X server operations when suspended (provided in msec), set to \fI0\fR to keep \fBnxagent\fR session fully functional when suspended diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index 754c55c96..4862748e0 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -8474,7 +8474,8 @@ int ParseEnvironmentOptions(const char *env, int force) else if (strcasecmp(name, "defer") == 0 || strcasecmp(name, "tile") == 0 || strcasecmp(name, "menu") == 0 || - strcasecmp(name, "state") == 0 ) + strcasecmp(name, "magicpixel") == 0 || + strcasecmp(name, "state") == 0 ) { nxdbg << "Loop: Ignoring agent option '" << name << "' with value '" << value << "'.\n" diff --git a/nxcomp/src/Misc.cpp b/nxcomp/src/Misc.cpp index 7e468f1e2..b6bf24578 100644 --- a/nxcomp/src/Misc.cpp +++ b/nxcomp/src/Misc.cpp @@ -343,6 +343,7 @@ shadowmode=s\n\ defer=n\n\ tile=s\n\ menu=n\n\ +magicpixel=n\n\ sleep=n\n\ tolerancechecks=s\n\ keyconv=s\n\ diff --git a/nxproxy/man/nxproxy.1 b/nxproxy/man/nxproxy.1 index bf194e7cf..260465ab1 100644 --- a/nxproxy/man/nxproxy.1 +++ b/nxproxy/man/nxproxy.1 @@ -327,6 +327,7 @@ encryption of the point to point communication. defer=<int> tile=<string> menu=<int> + magicpixel=<int> sleep=<int> .SH NX ENVIRONMENT VARIABLES |