diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-03 23:58:37 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-03 23:58:37 +0000 |
commit | e057cf9e08ab13e3f6ed139f6b0be3a06c2ec20c (patch) | |
tree | a022bd82c4c7b10cd396a463dd491d2897f70abe /klipper/clipboardpoll.cpp | |
parent | c3e2931a5bb4c067b0983cf23d064264d1d6b175 (diff) | |
download | tdebase-e057cf9e08ab13e3f6ed139f6b0be3a06c2ec20c.tar.gz tdebase-e057cf9e08ab13e3f6ed139f6b0be3a06c2ec20c.zip |
Wean kdebase off of hacky static qt_x_*_tim variables
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1227011 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klipper/clipboardpoll.cpp')
-rw-r--r-- | klipper/clipboardpoll.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/klipper/clipboardpoll.cpp b/klipper/clipboardpoll.cpp index d0b5cf01d..38ef196e4 100644 --- a/klipper/clipboardpoll.cpp +++ b/klipper/clipboardpoll.cpp @@ -58,8 +58,6 @@ */ -extern Time qt_x_time; - ClipboardPoll::ClipboardPoll( TQWidget* parent ) : TQWidget( parent ) , xfixes_event_base( -1 ) @@ -117,7 +115,7 @@ void ClipboardPoll::initPolling() timer.start( 1000, false ); selection.atom = XA_PRIMARY; clipboard.atom = xa_clipboard; - selection.last_change = clipboard.last_change = qt_x_time; // don't trigger right after startup + selection.last_change = clipboard.last_change = GET_QT_X_TIME(); // don't trigger right after startup selection.last_owner = XGetSelectionOwner( qt_xdisplay(), XA_PRIMARY ); #ifdef NOISY_KLIPPER_ kdDebug() << "(1) Setting last_owner for =" << "selection" << ":" << selection.last_owner << endl; @@ -154,7 +152,7 @@ bool ClipboardPoll::x11Event( XEvent* e ) #ifdef NOISY_KLIPPER_ kdDebug() << "SELECTION CHANGED (XFIXES)" << endl; #endif - qt_x_time = ev->timestamp; + SET_QT_X_TIME(ev->timestamp); emit clipboardChanged( true ); } else if( ev->selection == xa_clipboard && !kapp->tqclipboard()->ownsClipboard()) @@ -162,7 +160,7 @@ bool ClipboardPoll::x11Event( XEvent* e ) #ifdef NOISY_KLIPPER_ kdDebug() << "CLIPBOARD CHANGED (XFIXES)" << endl; #endif - qt_x_time = ev->timestamp; + SET_QT_X_TIME(ev->timestamp); emit clipboardChanged( false ); } } @@ -272,9 +270,9 @@ bool ClipboardPoll::checkTimestamp( SelectionData& data ) return false; } 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_timestamp, data.timestamp_atom, winId(), GET_QT_X_TIME() ); data.waiting_for_timestamp = true; - data.waiting_x_time = qt_x_time; + data.waiting_x_time = GET_QT_X_TIME(); #ifdef REALLY_NOISY_KLIPPER_ kdDebug() << "WAITING TIMESTAMP:" << ( data.atom == XA_PRIMARY ) << endl; #endif |