diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-03 20:56:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-03 20:56:33 +0000 |
commit | 7b12a18bb964683b857ca2250db3919303a99838 (patch) | |
tree | 1a2215bcfa2bdb06cac04a103d2d9e3617852212 /kdecore/kapplication.cpp | |
parent | b1960071ca0d9303610b4afd8c07afdf1f091756 (diff) | |
download | tdelibs-7b12a18bb964683b857ca2250db3919303a99838.tar.gz tdelibs-7b12a18bb964683b857ca2250db3919303a99838.zip |
Wean kdelibs off of the qt_x_*_time static variables
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1226986 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kapplication.cpp')
-rw-r--r-- | kdecore/kapplication.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp index 32091b863..a1df33463 100644 --- a/kdecore/kapplication.cpp +++ b/kdecore/kapplication.cpp @@ -172,8 +172,6 @@ bool KApplication::s_dcopClientNeedsPostInit = false; #ifdef Q_WS_X11 static Atom atom_DesktopWindow; static Atom atom_NetSupported; -extern Time qt_x_time; -extern Time qt_x_user_time; static Atom kde_xdnd_drop; #endif @@ -1750,18 +1748,18 @@ bool KApplication::x11EventFilter( XEvent *_event ) && _event->xclient.data.l[ 4 ] == 0 && _event->xclient.data.l[ 3 ] != 0 ) { - if( qt_x_user_time == 0 - || NET::timestampCompare( _event->xclient.data.l[ 3 ], qt_x_user_time ) > 0 ) + if( GET_QT_X_USER_TIME() == 0 + || NET::timestampCompare( _event->xclient.data.l[ 3 ], GET_QT_X_USER_TIME() ) > 0 ) { // and the timestamp looks reasonable - qt_x_user_time = _event->xclient.data.l[ 3 ]; // update our qt_x_user_time from it + SET_QT_X_USER_TIME(_event->xclient.data.l[ 3 ]); // update our qt_x_user_time from it } } else // normal DND, only needed until Qt updates qt_x_user_time from XdndDrop { - if( qt_x_user_time == 0 - || NET::timestampCompare( _event->xclient.data.l[ 2 ], qt_x_user_time ) > 0 ) + if( GET_QT_X_USER_TIME() == 0 + || NET::timestampCompare( _event->xclient.data.l[ 2 ], GET_QT_X_USER_TIME() ) > 0 ) { // the timestamp looks reasonable - qt_x_user_time = _event->xclient.data.l[ 2 ]; // update our qt_x_user_time from it + SET_QT_X_USER_TIME(_event->xclient.data.l[ 2 ]); // update our qt_x_user_time from it } } } @@ -1879,16 +1877,16 @@ void KApplication::updateUserTimestamp( unsigned long time ) time = ev.xproperty.time; XDestroyWindow( qt_xdisplay(), w ); } - if( qt_x_user_time == 0 - || NET::timestampCompare( time, qt_x_user_time ) > 0 ) // check time > qt_x_user_time - qt_x_user_time = time; + if( GET_QT_X_USER_TIME() == 0 + || NET::timestampCompare( time, GET_QT_X_USER_TIME() ) > 0 ) // check time > qt_x_user_time + SET_QT_X_USER_TIME(time); #endif } unsigned long KApplication::userTimestamp() const { #if defined Q_WS_X11 - return qt_x_user_time; + return GET_QT_X_USER_TIME(); #else return 0; #endif @@ -1898,7 +1896,7 @@ void KApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned { #if defined Q_WS_X11 if( time == 0 ) - time = qt_x_user_time; + time = GET_QT_X_USER_TIME(); DCOPRef( dcopId, "MainApplication-Interface" ).call( "updateUserTimestamp", time ); #endif } |