[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/klipper
From:       Esben Mose Hansen <kde () mosehansen ! dk>
Date:       2005-02-04 20:25:22
Message-ID: 20050204202522.8D0C41D017 () office ! kde ! org
[Download RAW message or body]

CVS commit by esben: 

This is a workaround for a (x)emacs bug.  The problem is that XEmacs
freezes if asked to copy >=262041 bytes. Thats just under 256, so I
suspect a char[256*1024] inside XEmacs.  To make matters worse, XEmacs
always respond none to the XConvertSelection with
Atom("TIMESTAMP"). Which causes Klipper to poll XEmacs every 1000ms,
each time causing QT to wait for 5s before timing out. In other words,
Klipper is out for the count until the user presses ctrl-G This fix
request the TARGETS property instead, which seem better supported.


  M +5 -5      clipboardpoll.cpp   1.12
  M +2 -2      clipboardpoll.h   1.7


--- kdebase/klipper/clipboardpoll.cpp  #1.11:1.12
@@ -61,5 +61,5 @@ ClipboardPoll::ClipboardPoll( QWidget* p
             "_QT_CLIPBOARD_SENTINEL",
             "CLIPBOARD",
-            "TIMESTAMP",
+            "TARGETS",
             "KLIPPER_SELECTION_TIMESTAMP",
             "KLIPPER_CLIPBOARD_TIMESTAMP" };
@@ -69,5 +69,5 @@ ClipboardPoll::ClipboardPoll( QWidget* p
     clipboard.sentinel_atom = atoms[ 1 ];
     xa_clipboard = atoms[ 2 ];
-    xa_timestamp = atoms[ 3 ];
+    xa_targets = atoms[ 3 ];
     selection.timestamp_atom = atoms[ 4 ];
     clipboard.timestamp_atom = atoms[ 5 ];
@@ -80,5 +80,5 @@ ClipboardPoll::ClipboardPoll( QWidget* p
 #endif
     clipboard.last_owner = XGetSelectionOwner( qt_xdisplay(), xa_clipboard );
-#ifdef NOISY_KLIPPER
+#ifdef NOISY_KLIPPER_
     kdDebug() << "(2) Setting last_owner for =" << "clipboard" << ":" << \
clipboard.last_owner << endl;  #endif
@@ -197,5 +197,5 @@ bool ClipboardPoll::checkTimestamp( Sele
     }
     XDeleteProperty( qt_xdisplay(), winId(), data.timestamp_atom );
-    XConvertSelection( qt_xdisplay(), data.atom, xa_timestamp, data.timestamp_atom, \
winId(), qt_x_time ); +    XConvertSelection( qt_xdisplay(), data.atom, xa_targets, \
data.timestamp_atom, winId(), qt_x_time );  data.waiting_for_timestamp = true;
     data.waiting_x_time = qt_x_time;
@@ -249,5 +249,5 @@ bool ClipboardPoll::changedTimestamp( Se
     if( timestamp != data.last_change || timestamp == CurrentTime )
     {
-#ifdef NOISY_KLIPPER
+#ifdef NOISY_KLIPPER_
         kdDebug() << "TIMESTAMP CHANGE:" << ( data.atom == XA_PRIMARY ) << endl;
 #endif

--- kdebase/klipper/clipboardpoll.h  #1.6:1.7
@@ -57,5 +57,5 @@ class ClipboardPoll
         SelectionData clipboard;
         Atom xa_clipboard;
-        Atom xa_timestamp;
+        Atom xa_targets;
     };
     


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic