aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-08-27 14:11:53 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-08-27 14:11:53 +0200
commit6bca289afd17db8e1faf3db884153a6cad40283f (patch)
tree0a78eff800b566497b0de09101a959c5f4abd977 /nx-X11/programs/Xserver/hw/nxagent/Dialog.c
parentdaa50fd80ed5f777754a51c0e2b4869ba083a337 (diff)
parent6181aa9113cc1e852d405ef85c184e32e7fad6c4 (diff)
downloadnx-libs-6bca289afd17db8e1faf3db884153a6cad40283f.tar.gz
nx-libs-6bca289afd17db8e1faf3db884153a6cad40283f.tar.bz2
nx-libs-6bca289afd17db8e1faf3db884153a6cad40283f.zip
Merge branch 'uli42-gh-sunweaver/pr/autograb-without-inputlock' into 3.6.x
Attributes GH PR #835: https://github.com/ArcticaProject/nx-libs/pull/835
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Dialog.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Dialog.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
index 753b9d708..0dcdda5a4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
@@ -63,6 +63,8 @@ int nxagentEnableRandRModeDialogPid = 0;
int nxagentDisableRandRModeDialogPid = 0;
int nxagentEnableDeferModePid = 0;
int nxagentDisableDeferModePid = 0;
+int nxagentEnableAutograbModePid = 0;
+int nxagentDisableAutograbModePid = 0;
static int nxagentFailedReconnectionDialogPid = 0;
@@ -158,6 +160,24 @@ void nxagentResetDialog(int pid)
nxagentDisableDeferModePid = 0;
}
+ else if (pid == nxagentEnableAutograbModePid)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentResetDialog: Resetting enable autograb mode dialog pid [%d].\n",
+ nxagentEnableAutograbModePid);
+ #endif
+
+ nxagentEnableAutograbModePid = 0;
+ }
+ else if (pid == nxagentDisableAutograbModePid)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentResetDialog: Resetting disable autograb mode dialog pid [%d].\n",
+ nxagentDisableAutograbModePid);
+ #endif
+
+ nxagentDisableAutograbModePid = 0;
+ }
}
void nxagentLaunchDialog(DialogType dialogType)
@@ -263,6 +283,24 @@ void nxagentLaunchDialog(DialogType dialogType)
break;
}
+ case DIALOG_ENABLE_AUTOGRAB_MODE:
+ {
+ message = DIALOG_ENABLE_AUTOGRAB_MODE_MESSAGE;
+ type = DIALOG_ENABLE_AUTOGRAB_MODE_TYPE;
+ local = DIALOG_ENABLE_AUTOGRAB_MODE_LOCAL;
+ pid = &nxagentEnableAutograbModePid;
+
+ break;
+ }
+ case DIALOG_DISABLE_AUTOGRAB_MODE:
+ {
+ message = DIALOG_DISABLE_AUTOGRAB_MODE_MESSAGE;
+ type = DIALOG_DISABLE_AUTOGRAB_MODE_TYPE;
+ local = DIALOG_DISABLE_AUTOGRAB_MODE_LOCAL;
+ pid = &nxagentDisableAutograbModePid;
+
+ break;
+ }
default:
{
#ifdef WARNING
@@ -496,6 +534,18 @@ void nxagentTerminateDialog(DialogType type)
break;
}
+ case DIALOG_ENABLE_AUTOGRAB_MODE:
+ {
+ pid = nxagentEnableAutograbModePid;
+
+ break;
+ }
+ case DIALOG_DISABLE_AUTOGRAB_MODE:
+ {
+ pid = nxagentDisableAutograbModePid;
+
+ break;
+ }
default:
{
#ifdef WARNING