Unverified Commit 164263e1 authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch 'sunweaver-pr/nomagicpixel' into 3.6.x

Attributes GH PR #658: https://github.com/ArcticaProject/nx-libs/pull/658 Fixes: ArcticaProject/nx-libs#657
parents 05152b78 8d00456a
...@@ -676,6 +676,10 @@ int ddxProcessArgument(int argc, char *argv[], int i) ...@@ -676,6 +676,10 @@ int ddxProcessArgument(int argc, char *argv[], int i)
return 1; return 1;
} }
if (!strcmp(argv[i], "-nomagicpixel")) {
nxagentChangeOption(MagicPixel, 0);
return 1;
}
if (!strcmp(argv[i], "-noonce")) if (!strcmp(argv[i], "-noonce"))
{ {
...@@ -1246,6 +1250,19 @@ static void nxagentParseOptions(char *name, char *value) ...@@ -1246,6 +1250,19 @@ static void nxagentParseOptions(char *name, char *value)
return; return;
} }
else if (!strcmp(name, "magicpixel"))
{
if (!strcmp(value, "0"))
{
nxagentChangeOption(MagicPixel, 0);
}
else
{
nxagentChangeOption(MagicPixel, 1);
}
return;
}
else if (strcmp(name, "shadowuid") == 0) else if (strcmp(name, "shadowuid") == 0)
{ {
nxagentShadowUid = atoi(value); nxagentShadowUid = atoi(value);
...@@ -2075,6 +2092,7 @@ void ddxUseMsg() ...@@ -2075,6 +2092,7 @@ void ddxUseMsg()
ErrorF("-forcenx force use of NX protocol messages assuming communication through nxproxy\n"); 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("-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("-norootlessexit don't exit if there are no clients in rootless mode\n");
ErrorF("-nomagicpixel disable nxagent's magic pixel\n");
#ifdef RENDER #ifdef RENDER
ErrorF("-norender disable the use of the render extension\n"); ErrorF("-norender disable the use of the render extension\n");
ErrorF("-nocomposite disable the use of the composite extension\n"); ErrorF("-nocomposite disable the use of the composite extension\n");
......
...@@ -1218,7 +1218,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was ...@@ -1218,7 +1218,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
if (nxagentOption(Fullscreen)) 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); pScreen = nxagentScreen(X.xbutton.window);
......
...@@ -155,6 +155,8 @@ void nxagentInitOptions() ...@@ -155,6 +155,8 @@ void nxagentInitOptions()
nxagentOptions.Menu = 1; nxagentOptions.Menu = 1;
nxagentOptions.MagicPixel = 1;
nxagentOptions.ClientOs = UNDEFINED; nxagentOptions.ClientOs = UNDEFINED;
nxagentOptions.InhibitXkb = 1; nxagentOptions.InhibitXkb = 1;
......
...@@ -386,6 +386,12 @@ typedef struct _AgentOptions ...@@ -386,6 +386,12 @@ typedef struct _AgentOptions
int Menu; int Menu;
/* /*
* Enabling/disabling the magic pixel.
*/
int MagicPixel;
/*
* Specify the Operative System of the client. * Specify the Operative System of the client.
*/ */
......
...@@ -399,6 +399,10 @@ auto-disconnect timeout in seconds (minimum allowed: 60) ...@@ -399,6 +399,10 @@ auto-disconnect timeout in seconds (minimum allowed: 60)
.B \-norootlessexit .B \-norootlessexit
don't exit if there are no clients in rootless mode don't exit if there are no clients in rootless mode
.TP 8 .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 .B \-norender
disable the use of the render extension disable the use of the render extension
.TP 8 .TP 8
...@@ -599,6 +603,9 @@ overrides the command line default. ...@@ -599,6 +603,9 @@ overrides the command line default.
support pulldown menu in \fBnxagent\fR session (only available on support pulldown menu in \fBnxagent\fR session (only available on
proxy <-> agent remote sessions) proxy <-> agent remote sessions)
.TP 8 .TP 8
.B magicpixel=<int>
enable/disable magic pixel support in fullscreen mode (default: 1, enabled)
.TP 8
.B sleep=<int> .B sleep=<int>
delay X server operations when suspended (provided in msec), set to delay X server operations when suspended (provided in msec), set to
\fI0\fR to keep \fBnxagent\fR session fully functional when suspended \fI0\fR to keep \fBnxagent\fR session fully functional when suspended
......
...@@ -8474,6 +8474,7 @@ int ParseEnvironmentOptions(const char *env, int force) ...@@ -8474,6 +8474,7 @@ int ParseEnvironmentOptions(const char *env, int force)
else if (strcasecmp(name, "defer") == 0 || else if (strcasecmp(name, "defer") == 0 ||
strcasecmp(name, "tile") == 0 || strcasecmp(name, "tile") == 0 ||
strcasecmp(name, "menu") == 0 || strcasecmp(name, "menu") == 0 ||
strcasecmp(name, "magicpixel") == 0 ||
strcasecmp(name, "state") == 0 ) strcasecmp(name, "state") == 0 )
{ {
nxdbg << "Loop: Ignoring agent option '" << name nxdbg << "Loop: Ignoring agent option '" << name
......
...@@ -343,6 +343,7 @@ shadowmode=s\n\ ...@@ -343,6 +343,7 @@ shadowmode=s\n\
defer=n\n\ defer=n\n\
tile=s\n\ tile=s\n\
menu=n\n\ menu=n\n\
magicpixel=n\n\
sleep=n\n\ sleep=n\n\
tolerancechecks=s\n\ tolerancechecks=s\n\
keyconv=s\n\ keyconv=s\n\
......
...@@ -327,6 +327,7 @@ encryption of the point to point communication. ...@@ -327,6 +327,7 @@ encryption of the point to point communication.
defer=<int> defer=<int>
tile=<string> tile=<string>
menu=<int> menu=<int>
magicpixel=<int>
sleep=<int> sleep=<int>
.SH NX ENVIRONMENT VARIABLES .SH NX ENVIRONMENT VARIABLES
......
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