aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-07 13:19:10 +0000
committermarha <marha@users.sourceforge.net>2011-03-07 13:19:10 +0000
commit407615d5836ff968b655eb4b9a5f186de3d4e7f9 (patch)
tree5cbfe69a99619a348dde0cf3e9dbfe6d02b66c14 /xorg-server
parentb5eab44b14b3193bfc327d10e556de8236071716 (diff)
downloadvcxsrv-407615d5836ff968b655eb4b9a5f186de3d4e7f9.tar.gz
vcxsrv-407615d5836ff968b655eb4b9a5f186de3d4e7f9.tar.bz2
vcxsrv-407615d5836ff968b655eb4b9a5f186de3d4e7f9.zip
Solved compilation problems. clipboard without primary selection is working now
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/hw/xwin/winclipboardthread.c1
-rw-r--r--xorg-server/hw/xwin/winclipboardwndproc.c1
-rw-r--r--xorg-server/hw/xwin/winclipboardwrappers.c46
-rw-r--r--xorg-server/hw/xwin/winclipboardxevents.c1
-rw-r--r--xorg-server/hw/xwin/winprocarg.c1
5 files changed, 26 insertions, 24 deletions
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c
index 24b04c147..de63f547e 100644
--- a/xorg-server/hw/xwin/winclipboardthread.c
+++ b/xorg-server/hw/xwin/winclipboardthread.c
@@ -56,6 +56,7 @@ extern Bool g_fClipboardStarted;
extern HWND g_hwndClipboard;
extern void *g_pClipboardDisplay;
extern Window g_iClipboardWindow;
+extern Bool g_fClipboardPrimary;
/*
diff --git a/xorg-server/hw/xwin/winclipboardwndproc.c b/xorg-server/hw/xwin/winclipboardwndproc.c
index 540b2136a..074a4f52d 100644
--- a/xorg-server/hw/xwin/winclipboardwndproc.c
+++ b/xorg-server/hw/xwin/winclipboardwndproc.c
@@ -60,6 +60,7 @@ extern Atom g_atomLastOwnedSelection;
extern Bool g_fClipboardStarted;
/* BPS - g_hwndClipboard needed for X app->Windows paste fix */
extern HWND g_hwndClipboard;
+extern Bool g_fClipboardPrimary;
/*
* Local function prototypes
diff --git a/xorg-server/hw/xwin/winclipboardwrappers.c b/xorg-server/hw/xwin/winclipboardwrappers.c
index f1817f29b..cbf9a8ed2 100644
--- a/xorg-server/hw/xwin/winclipboardwrappers.c
+++ b/xorg-server/hw/xwin/winclipboardwrappers.c
@@ -70,6 +70,7 @@ extern Bool g_fClipboard;
extern Window g_iClipboardWindow;
extern Atom g_atomLastOwnedSelection;
extern HWND g_hwndClipboard;
+extern Bool g_fClipboardPrimary;
extern winDispatchProcPtr winProcEstablishConnectionOrig;
extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
@@ -239,30 +240,27 @@ winProcSetSelectionOwner (ClientPtr client)
/* Now we either have a valid window or None */
/* Save selection owners for monitored selections, ignore other selections */
- if (XA_PRIMARY == stuff->selection)
+ if (XA_PRIMARY == stuff->selection && g_fClipboardPrimary)
{
- if (g_fClipboardPrimary)
- {
/* Look for owned -> not owned transition */
- if (None == stuff->window
- && None != s_iOwners[CLIP_OWN_PRIMARY])
- {
- winDebug ("winProcSetSelectionOwner - PRIMARY - Going from "
- "owned to not owned.\n");
-
- /* Adjust last owned selection */
- if (None != s_iOwners[CLIP_OWN_CLIPBOARD])
- g_atomLastOwnedSelection = MakeAtom ("CLIPBOARD", 9, TRUE);
- else
- g_atomLastOwnedSelection = None;
- }
-
- /* Save new selection owner or None */
- s_iOwners[CLIP_OWN_PRIMARY] = stuff->window;
-
- winDebug ("winProcSetSelectionOwner - PRIMARY - Now owned by: 0x%x (clipboard is 0x%x)\n",
- stuff->window,g_iClipboardWindow);
- }
+ if (None == stuff->window
+ && None != s_iOwners[CLIP_OWN_PRIMARY])
+ {
+ winDebug ("winProcSetSelectionOwner - PRIMARY - Going from "
+ "owned to not owned.\n");
+
+ /* Adjust last owned selection */
+ if (None != s_iOwners[CLIP_OWN_CLIPBOARD])
+ g_atomLastOwnedSelection = MakeAtom ("CLIPBOARD", 9, TRUE);
+ else
+ g_atomLastOwnedSelection = None;
+ }
+
+ /* Save new selection owner or None */
+ s_iOwners[CLIP_OWN_PRIMARY] = stuff->window;
+
+ winDebug ("winProcSetSelectionOwner - PRIMARY - Now owned by: 0x%x (clipboard is 0x%x)\n",
+ stuff->window,g_iClipboardWindow);
}
else if (MakeAtom ("CLIPBOARD", 9, TRUE) == stuff->selection)
{
@@ -274,7 +272,7 @@ winProcSetSelectionOwner (ClientPtr client)
"owned to not owned.\n");
/* Adjust last owned selection */
- if (None != s_iOwners[CLIP_OWN_PRIMARY] && g_fClipboardPrimary)
+ if ((None != s_iOwners[CLIP_OWN_PRIMARY]) && g_fClipboardPrimary)
g_atomLastOwnedSelection = XA_PRIMARY;
else
g_atomLastOwnedSelection = None;
@@ -294,7 +292,7 @@ winProcSetSelectionOwner (ClientPtr client)
* clipboard manager then it should be marked as unowned since
* we will be taking ownership of the Win32 clipboard.
*/
- if (g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY] && g_fClipboardPrimary)
+ if (g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY])
s_iOwners[CLIP_OWN_PRIMARY] = None;
if (g_iClipboardWindow == s_iOwners[CLIP_OWN_CLIPBOARD])
s_iOwners[CLIP_OWN_CLIPBOARD] = None;
diff --git a/xorg-server/hw/xwin/winclipboardxevents.c b/xorg-server/hw/xwin/winclipboardxevents.c
index dc7db352a..00bf90a28 100644
--- a/xorg-server/hw/xwin/winclipboardxevents.c
+++ b/xorg-server/hw/xwin/winclipboardxevents.c
@@ -43,6 +43,7 @@
*/
extern Bool g_fUnicodeSupport;
+extern Bool g_fClipboardPrimary;
/*
diff --git a/xorg-server/hw/xwin/winprocarg.c b/xorg-server/hw/xwin/winprocarg.c
index 9566a4f0a..aab5091c9 100644
--- a/xorg-server/hw/xwin/winprocarg.c
+++ b/xorg-server/hw/xwin/winprocarg.c
@@ -44,6 +44,7 @@ from The Open Group.
#ifdef XWIN_CLIPBOARD
extern Bool g_fUnicodeClipboard;
extern Bool g_fClipboard;
+extern Bool g_fClipboardPrimary;
#endif
/*