Unverified Commit 22b6ac72 authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch 'sunweaver-pr/nxagent-dialog-fixes' into 3.6.x

parents 61d5cd0b 0f67af9d
...@@ -63,7 +63,6 @@ int nxagentEnableRandRModeDialogPid = 0; ...@@ -63,7 +63,6 @@ int nxagentEnableRandRModeDialogPid = 0;
int nxagentDisableRandRModeDialogPid = 0; int nxagentDisableRandRModeDialogPid = 0;
int nxagentEnableDeferModePid = 0; int nxagentEnableDeferModePid = 0;
int nxagentDisableDeferModePid = 0; int nxagentDisableDeferModePid = 0;
int nxagentDisableXkbPid = 0;
static int nxagentFailedReconnectionDialogPid = 0; static int nxagentFailedReconnectionDialogPid = 0;
...@@ -159,15 +158,6 @@ void nxagentResetDialog(int pid) ...@@ -159,15 +158,6 @@ void nxagentResetDialog(int pid)
nxagentDisableDeferModePid = 0; nxagentDisableDeferModePid = 0;
} }
else if (pid == nxagentDisableXkbPid)
{
#ifdef TEST
fprintf(stderr, "nxagentResetDialog: Resetting disable XKB dialog pid [%d].\n",
nxagentDisableXkbPid);
#endif
nxagentDisableXkbPid = 0;
}
} }
void nxagentLaunchDialog(DialogType dialogType) void nxagentLaunchDialog(DialogType dialogType)
...@@ -273,15 +263,6 @@ void nxagentLaunchDialog(DialogType dialogType) ...@@ -273,15 +263,6 @@ void nxagentLaunchDialog(DialogType dialogType)
break; break;
} }
case DIALOG_DISABLE_XKB:
{
message = DIALOG_DISABLE_XKB_MESSAGE;
type = DIALOG_DISABLE_XKB_TYPE;
local = DIALOG_DISABLE_XKB_LOCAL;
pid = &nxagentDisableXkbPid;
break;
}
default: default:
{ {
#ifdef WARNING #ifdef WARNING
...@@ -521,12 +502,6 @@ void nxagentTerminateDialog(DialogType type) ...@@ -521,12 +502,6 @@ void nxagentTerminateDialog(DialogType type)
break; break;
} }
case DIALOG_DISABLE_XKB:
{
pid = nxagentDisableXkbPid;
break;
}
default: default:
{ {
#ifdef WARNING #ifdef WARNING
......
...@@ -41,7 +41,6 @@ typedef enum ...@@ -41,7 +41,6 @@ typedef enum
DIALOG_FAILED_RECONNECTION, DIALOG_FAILED_RECONNECTION,
DIALOG_ENABLE_DEFER_MODE, DIALOG_ENABLE_DEFER_MODE,
DIALOG_DISABLE_DEFER_MODE, DIALOG_DISABLE_DEFER_MODE,
DIALOG_DISABLE_XKB,
DIALOG_LAST_TAG DIALOG_LAST_TAG
} DialogType; } DialogType;
...@@ -55,7 +54,6 @@ extern int nxagentEnableRandRModeDialogPid; ...@@ -55,7 +54,6 @@ extern int nxagentEnableRandRModeDialogPid;
extern int nxagentDisableRandRModeDialogPid; extern int nxagentDisableRandRModeDialogPid;
extern int nxagentEnableDeferModePid; extern int nxagentEnableDeferModePid;
extern int nxagentDisableDeferModePid; extern int nxagentDisableDeferModePid;
extern int nxagentDisableXkbPid;
extern char nxagentFailedReconnectionMessage[]; extern char nxagentFailedReconnectionMessage[];
...@@ -74,8 +72,7 @@ extern void nxagentTerminateDialogs(void); ...@@ -74,8 +72,7 @@ extern void nxagentTerminateDialogs(void);
nxagentEnableRandRModeDialogPid == 0 && \ nxagentEnableRandRModeDialogPid == 0 && \
nxagentDisableRandRModeDialogPid == 0 && \ nxagentDisableRandRModeDialogPid == 0 && \
nxagentEnableDeferModePid == 0 && \ nxagentEnableDeferModePid == 0 && \
nxagentDisableDeferModePid == 0 && \ nxagentDisableDeferModePid == 0)
nxagentDisableXkbPid == 0)
#define DECODE_DIALOG_TYPE(type) \ #define DECODE_DIALOG_TYPE(type) \
((type) == DIALOG_KILL_SESSION ? "DIALOG_KILL_SESSION" : \ ((type) == DIALOG_KILL_SESSION ? "DIALOG_KILL_SESSION" : \
...@@ -88,7 +85,6 @@ extern void nxagentTerminateDialogs(void); ...@@ -88,7 +85,6 @@ extern void nxagentTerminateDialogs(void);
(type) == DIALOG_FAILED_RECONNECTION ? "DIALOG_FAILED_RECONNECTION" : \ (type) == DIALOG_FAILED_RECONNECTION ? "DIALOG_FAILED_RECONNECTION" : \
(type) == DIALOG_ENABLE_DEFER_MODE ? "DIALOG_ENABLE_DEFER_MODE" : \ (type) == DIALOG_ENABLE_DEFER_MODE ? "DIALOG_ENABLE_DEFER_MODE" : \
(type) == DIALOG_DISABLE_DEFER_MODE ? "DIALOG_DISABLE_DEFER_MODE" : \ (type) == DIALOG_DISABLE_DEFER_MODE ? "DIALOG_DISABLE_DEFER_MODE" : \
(type) == DIALOG_DISABLE_XKB ? "DIALOG_DISABLE_XKB" : \
"UNKNOWN_DIALOG") "UNKNOWN_DIALOG")
/* /*
...@@ -216,16 +212,5 @@ Ctrl+Alt+E to enable it again.\ ...@@ -216,16 +212,5 @@ Ctrl+Alt+E to enable it again.\
#define DIALOG_DISABLE_DEFER_MODE_LOCAL 0 #define DIALOG_DISABLE_DEFER_MODE_LOCAL 0
#define DIALOG_DISABLE_XKB_MESSAGE \
\
"\
Changing layout is not allowed with your current display.\
"
#define DIALOG_DISABLE_XKB_TYPE "ok"
#define DIALOG_DISABLE_XKB_LOCAL 0
#endif /* __Dialog_H__ */ #endif /* __Dialog_H__ */
...@@ -260,6 +260,9 @@ int NXTransDialog(const char *caption, const char *message, ...@@ -260,6 +260,9 @@ int NXTransDialog(const char *caption, const char *message,
// in the default NX path. // in the default NX path.
// //
if (i == 0)
{
strcpy(command, "nxclient"); strcpy(command, "nxclient");
char newPath[DEFAULT_STRING_LIMIT]; char newPath[DEFAULT_STRING_LIMIT];
...@@ -312,6 +315,8 @@ int NXTransDialog(const char *caption, const char *message, ...@@ -312,6 +315,8 @@ int NXTransDialog(const char *caption, const char *message,
setenv("PATH", newPath, 1); setenv("PATH", newPath, 1);
#endif #endif
}
} }
// //
...@@ -455,6 +460,9 @@ int NXTransClient(const char* display) ...@@ -455,6 +460,9 @@ int NXTransClient(const char* display)
// in the default NX path. // in the default NX path.
// //
if (i == 0)
{
strcpy(command, "nxclient"); strcpy(command, "nxclient");
char newPath[DEFAULT_STRING_LIMIT]; char newPath[DEFAULT_STRING_LIMIT];
...@@ -509,6 +517,7 @@ int NXTransClient(const char* display) ...@@ -509,6 +517,7 @@ int NXTransClient(const char* display)
#endif #endif
} }
}
// //
// Hopefully useless. // Hopefully useless.
// //
......
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