From e057cf9e08ab13e3f6ed139f6b0be3a06c2ec20c Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 3 Apr 2011 23:58:37 +0000 Subject: 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 --- kwin/client.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'kwin/client.cpp') diff --git a/kwin/client.cpp b/kwin/client.cpp index 2b7794748..dfb352408 100644 --- a/kwin/client.cpp +++ b/kwin/client.cpp @@ -38,7 +38,6 @@ License. See the file "COPYING" for the exact licensing terms. // to resolve them properly extern Atom qt_wm_state; -extern Time qt_x_time; extern Atom qt_window_role; extern Atom qt_sm_client_id; @@ -1660,7 +1659,7 @@ void Client::sendClientMessage(Window w, Atom a, Atom protocol, long data1, long ev.xclient.message_type = a; ev.xclient.format = 32; ev.xclient.data.l[0] = protocol; - ev.xclient.data.l[1] = qt_x_time; + ev.xclient.data.l[1] = GET_QT_X_TIME(); ev.xclient.data.l[2] = data1; ev.xclient.data.l[3] = data2; ev.xclient.data.l[4] = data3; @@ -1737,7 +1736,7 @@ void Client::pingWindow() ping_timer = new TQTimer( this ); connect( ping_timer, TQT_SIGNAL( timeout()), TQT_SLOT( pingTimeout())); ping_timer->start( options->killPingTimeout, true ); - ping_timestamp = qt_x_time; + ping_timestamp = GET_QT_X_TIME(); workspace()->sendPingToWindow( window(), ping_timestamp ); } @@ -1919,15 +1918,15 @@ void Client::takeActivity( int flags, bool handled, allowed_t ) #ifndef NDEBUG static Time previous_activity_timestamp; static Client* previous_client; - if( previous_activity_timestamp == qt_x_time && previous_client != this ) + if( previous_activity_timestamp == GET_QT_X_TIME() && previous_client != this ) { kdDebug( 1212 ) << "Repeated use of the same X timestamp for activity" << endl; kdDebug( 1212 ) << kdBacktrace() << endl; } - previous_activity_timestamp = qt_x_time; + previous_activity_timestamp = GET_QT_X_TIME(); previous_client = this; #endif - workspace()->sendTakeActivity( this, qt_x_time, flags ); + workspace()->sendTakeActivity( this, GET_QT_X_TIME(), flags ); } // performs the actual focusing of the window using XSetInputFocus and WM_TAKE_FOCUS @@ -1936,17 +1935,17 @@ void Client::takeFocus( allowed_t ) #ifndef NDEBUG static Time previous_focus_timestamp; static Client* previous_client; - if( previous_focus_timestamp == qt_x_time && previous_client != this ) + if( previous_focus_timestamp == GET_QT_X_TIME() && previous_client != this ) { kdDebug( 1212 ) << "Repeated use of the same X timestamp for focus" << endl; kdDebug( 1212 ) << kdBacktrace() << endl; } - previous_focus_timestamp = qt_x_time; + previous_focus_timestamp = GET_QT_X_TIME(); previous_client = this; #endif if ( rules()->checkAcceptFocus( input )) { - XSetInputFocus( qt_xdisplay(), window(), RevertToPointerRoot, qt_x_time ); + XSetInputFocus( qt_xdisplay(), window(), RevertToPointerRoot, GET_QT_X_TIME() ); } if ( Ptakefocus ) sendClientMessage(window(), atoms->wm_protocols, atoms->wm_take_focus); -- cgit v1.2.3