aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winclipboardxevents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
commit81f91c615982e50bb62708201569c33a3cd3d973 (patch)
tree4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/hw/xwin/winclipboardxevents.c
parentb571a562410f565af2bdde52d9f7f9a23ffae04f (diff)
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xwin/winclipboardxevents.c')
-rw-r--r--xorg-server/hw/xwin/winclipboardxevents.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/xorg-server/hw/xwin/winclipboardxevents.c b/xorg-server/hw/xwin/winclipboardxevents.c
index 09bdb7396..1d912936a 100644
--- a/xorg-server/hw/xwin/winclipboardxevents.c
+++ b/xorg-server/hw/xwin/winclipboardxevents.c
@@ -34,6 +34,7 @@
#include <xwin-config.h>
#endif
#include "winclipboard.h"
+#include "misc.h"
/*
@@ -53,25 +54,20 @@ winClipboardFlushXEvents (HWND hwnd,
Display *pDisplay,
Bool fUseUnicode)
{
- static Atom atomLocalProperty, atomCompoundText;
- static Atom atomUTF8String, atomTargets;
-
- if (atomLocalProperty == None)
- atomLocalProperty = XInternAtom (pDisplay,
- WIN_LOCAL_PROPERTY,
- False);
- if (atomUTF8String == None)
- atomUTF8String = XInternAtom (pDisplay,
- "UTF8_STRING",
- False);
- if (atomCompoundText == None)
- atomCompoundText = XInternAtom (pDisplay,
- "COMPOUND_TEXT",
- False);
- if (atomTargets == None)
- atomTargets = XInternAtom (pDisplay,
- "TARGETS",
- False);
+ static Atom atomLocalProperty;
+ static Atom atomCompoundText;
+ static Atom atomUTF8String;
+ static Atom atomTargets;
+ static int generation;
+
+ if (generation != serverGeneration)
+ {
+ generation = serverGeneration;
+ atomLocalProperty = XInternAtom (pDisplay, WIN_LOCAL_PROPERTY, False);
+ atomUTF8String = XInternAtom (pDisplay, "UTF8_STRING", False);
+ atomCompoundText = XInternAtom (pDisplay, "COMPOUND_TEXT", False);
+ atomTargets = XInternAtom (pDisplay, "TARGETS", False);
+ }
/* Process all pending events */
while (XPending (pDisplay))
@@ -196,8 +192,13 @@ winClipboardFlushXEvents (HWND hwnd,
if (fUseUnicode
&& !IsClipboardFormatAvailable (CF_UNICODETEXT))
{
- ErrorF ("winClipboardFlushXEvents - CF_UNICODETEXT is not "
- "available from Win32 clipboard. Aborting.\n");
+ static int count; /* Hack to stop acroread spamming the log */
+ static HWND lasthwnd; /* I've not seen any other client get here repeatedly? */
+ if (hwnd != lasthwnd) count = 0;
+ count++;
+ if (count < 6) ErrorF ("winClipboardFlushXEvents - CF_UNICODETEXT is not "
+ "available from Win32 clipboard. Aborting %d.\n", count);
+ lasthwnd = hwnd;
/* Abort */
XUnlockDisplay (pDisplay);