aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-07 11:09:57 +0000
committermarha <marha@users.sourceforge.net>2011-03-07 11:09:57 +0000
commitb5eab44b14b3193bfc327d10e556de8236071716 (patch)
tree3a87385a765eda5106df883ff2fab4c93c2e5a33
parentfaed2dca735b7aa26a146c5e309cafa8134425b9 (diff)
downloadvcxsrv-b5eab44b14b3193bfc327d10e556de8236071716.tar.gz
vcxsrv-b5eab44b14b3193bfc327d10e556de8236071716.tar.bz2
vcxsrv-b5eab44b14b3193bfc327d10e556de8236071716.zip
Added possibility of mapping the PRIMARY selection
-rw-r--r--xorg-server/hw/xwin/xlaunch/config.cc2
-rw-r--r--xorg-server/hw/xwin/xlaunch/config.h3
-rw-r--r--xorg-server/hw/xwin/xlaunch/main.cc8
-rw-r--r--xorg-server/hw/xwin/xlaunch/makefile2
-rw-r--r--xorg-server/hw/xwin/xlaunch/resources/dialog.rc15
-rw-r--r--xorg-server/hw/xwin/xlaunch/resources/resources.h2
-rw-r--r--xorg-server/hw/xwin/xlaunch/resources/strings.rc2
7 files changed, 26 insertions, 8 deletions
diff --git a/xorg-server/hw/xwin/xlaunch/config.cc b/xorg-server/hw/xwin/xlaunch/config.cc
index 841d7a2a7..3be68b0b3 100644
--- a/xorg-server/hw/xwin/xlaunch/config.cc
+++ b/xorg-server/hw/xwin/xlaunch/config.cc
@@ -88,6 +88,7 @@ void CConfig::Save(const char *filename)
setAttribute(root, "XDMCPBroadcast", broadcast?"True":"False");
setAttribute(root, "XDMCPIndirect", indirect?"True":"False");
setAttribute(root, "Clipboard", clipboard?"True":"False");
+ setAttribute(root, "ClipboardPrimary", clipboardprimary?"True":"False");
setAttribute(root, "ExtraParams", extra_params.c_str());
setAttribute(root, "Wgl", wgl?"True":"False");
@@ -172,6 +173,7 @@ void CConfig::Load(const char *filename)
getAttributeBool(root, "XDMCPBroadcast", broadcast);
getAttributeBool(root, "XDMCPIndirect", indirect);
getAttributeBool(root, "Clipboard", clipboard);
+ getAttributeBool(root, "ClipboardPrimary", clipboardprimary);
getAttribute(root, "ExtraParams", extra_params);
getAttributeBool(root, "Wgl", wgl);
diff --git a/xorg-server/hw/xwin/xlaunch/config.h b/xorg-server/hw/xwin/xlaunch/config.h
index 993c31580..e59c3e155 100644
--- a/xorg-server/hw/xwin/xlaunch/config.h
+++ b/xorg-server/hw/xwin/xlaunch/config.h
@@ -60,6 +60,7 @@ struct CConfig
std::string xdmcp_host;
std::vector<std::string> xhosts;
bool clipboard;
+ bool clipboardprimary;
bool wgl;
bool no_access_control;
std::string font_server;
@@ -73,7 +74,7 @@ struct CConfig
local(false), protocol(""),
protocol_path(""), program("xeyes"), progs(PROG_NUMBER), compress(false), host(""), user("ago"),
password(""), password_save(false), password_start(false), broadcast(false),
- indirect(false), xdmcp_host(""), xhosts(HOST_NUMBER), clipboard(true), no_access_control(false),
+ indirect(false), xdmcp_host(""), xhosts(HOST_NUMBER), clipboard(true), clipboardprimary(true), no_access_control(false),
font_server(), extra_params(), extra_ssh(), wgl(true) {};
void Load(const char * filename);
void Save(const char * filename);
diff --git a/xorg-server/hw/xwin/xlaunch/main.cc b/xorg-server/hw/xwin/xlaunch/main.cc
index 26a132756..5eedc75e8 100644
--- a/xorg-server/hw/xwin/xlaunch/main.cc
+++ b/xorg-server/hw/xwin/xlaunch/main.cc
@@ -202,6 +202,11 @@ class CMyWizard : public CWizard
config.clipboard = true;
else
config.clipboard = false;
+ // check for clipboard primary selection
+ if (IsDlgButtonChecked(hwndDlg, IDC_CLIPBOARDPRIMARY))
+ config.clipboardprimary = true;
+ else
+ config.clipboardprimary = false;
// check for wgl
if (IsDlgButtonChecked(hwndDlg, IDC_WGL))
config.wgl = true;
@@ -459,6 +464,7 @@ class CMyWizard : public CWizard
break;
case IDD_EXTRA:
CheckDlgButton(hwndDlg, IDC_CLIPBOARD, config.clipboard?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLIPBOARDPRIMARY, config.clipboardprimary?BST_CHECKED:BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_WGL, config.wgl?BST_CHECKED:BST_UNCHECKED);
SetDlgItemText(hwndDlg, IDC_EXTRA_PARAMS, config.extra_params.c_str());
break;
@@ -558,6 +564,8 @@ class CMyWizard : public CWizard
}
if (config.clipboard)
buffer += "-clipboard ";
+ if (!config.clipboardprimary)
+ buffer += "-noclipboardprimary ";
if (config.wgl)
buffer += "-wgl ";
if (!config.extra_params.empty())
diff --git a/xorg-server/hw/xwin/xlaunch/makefile b/xorg-server/hw/xwin/xlaunch/makefile
index 489ad8d66..b97d7ecb6 100644
--- a/xorg-server/hw/xwin/xlaunch/makefile
+++ b/xorg-server/hw/xwin/xlaunch/makefile
@@ -19,7 +19,7 @@ WINAPP = xlaunch
RESOURCES = resources.rc
-$(OBJDIR)\%.res : resources\%.rc
+$(OBJDIR)\%.res : resources\%.rc $(wildcard resources\*.rc)
$(RC) $(RCFLAGS) $(RCDEFINES:%=-d "%") $(RCINCLUDES:%=-i %) -Fo$(relpath $@) $<
LIBDIRS=$(dir $(INCLUDELIBFILES))
diff --git a/xorg-server/hw/xwin/xlaunch/resources/dialog.rc b/xorg-server/hw/xwin/xlaunch/resources/dialog.rc
index f6675e192..e432d724b 100644
--- a/xorg-server/hw/xwin/xlaunch/resources/dialog.rc
+++ b/xorg-server/hw/xwin/xlaunch/resources/dialog.rc
@@ -100,14 +100,17 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION STR_CAPTION_EXTRA
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- AUTOCHECKBOX STR_CLIPBOARD,IDC_CLIPBOARD,7,14,300,10
- LTEXT STR_CLIPBOARD_DESC,IDC_CLIPBOARD_DESC,19,24,280,27
+ AUTOCHECKBOX STR_CLIPBOARD,IDC_CLIPBOARD,7,10,300,10
+ LTEXT STR_CLIPBOARD_DESC,IDC_CLIPBOARD_DESC,19,20,280,27
- AUTOCHECKBOX STR_WGL,IDC_WGL,7,42,300,10
- LTEXT STR_WGL_DESC,IDC_WGL_DESC,19,52,280,27
+ AUTOCHECKBOX STR_CLIPBOARDPRIMARY,IDC_CLIPBOARDPRIMARY,19,30,300,10
+ LTEXT STR_CLIPBOARDPRIMARY_DESC,IDC_CLIPBOARDPRIMARY_DESC,31,40,280,27
- LTEXT STR_EXTRA_PARAMS_DESC,IDC_EXTRA_PARAMS_DESC,7,84,280,10
- EDITTEXT IDC_EXTRA_PARAMS,7,98,300,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
+ AUTOCHECKBOX STR_WGL,IDC_WGL,7,56,300,10
+ LTEXT STR_WGL_DESC,IDC_WGL_DESC,19,66,280,27
+
+ LTEXT STR_EXTRA_PARAMS_DESC,IDC_EXTRA_PARAMS_DESC,7,95,280,10
+ EDITTEXT IDC_EXTRA_PARAMS,7,105,300,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
END
IDD_FINISH DIALOGEX 0, 0, 317, 143
diff --git a/xorg-server/hw/xwin/xlaunch/resources/resources.h b/xorg-server/hw/xwin/xlaunch/resources/resources.h
index 4465952c7..93a9bbf44 100644
--- a/xorg-server/hw/xwin/xlaunch/resources/resources.h
+++ b/xorg-server/hw/xwin/xlaunch/resources/resources.h
@@ -101,3 +101,5 @@
#define IDC_EXTRA_PARAMS_DESC 263
#define IDC_WGL 264
#define IDC_WGL_DESC 265
+#define IDC_CLIPBOARDPRIMARY 266
+#define IDC_CLIPBOARDPRIMARY_DESC 267
diff --git a/xorg-server/hw/xwin/xlaunch/resources/strings.rc b/xorg-server/hw/xwin/xlaunch/resources/strings.rc
index 1896ffe59..10a00d967 100644
--- a/xorg-server/hw/xwin/xlaunch/resources/strings.rc
+++ b/xorg-server/hw/xwin/xlaunch/resources/strings.rc
@@ -60,6 +60,8 @@
#define STR_CAPTION_EXTRA "Extra settings"
#define STR_CLIPBOARD "Clipboard"
#define STR_CLIPBOARD_DESC "Start the integrated clipboard manager"
+#define STR_CLIPBOARDPRIMARY "Primary Selection"
+#define STR_CLIPBOARDPRIMARY_DESC "Also map the PRIMARY selection to the windows clipboard."
#define STR_WGL "Native opengl"
#define STR_WGL_DESC "Use the native windows opengl library (wgl). Make sure to export the LIBGL_ALWAYS_INDIRECT environment variable."
#define STR_EXTRA_PARAMS_DESC "Additional parameters for VcXsrv"