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 /konqueror/konq_mainwindow.cc | |
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 'konqueror/konq_mainwindow.cc')
-rw-r--r-- | konqueror/konq_mainwindow.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/konqueror/konq_mainwindow.cc b/konqueror/konq_mainwindow.cc index 79b88daa3..aa237261f 100644 --- a/konqueror/konq_mainwindow.cc +++ b/konqueror/konq_mainwindow.cc @@ -1292,8 +1292,7 @@ void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs // well. If the WM has support for _NET_WM_USER_TIME, it will be just set to 0 (=don't focus on show), // and the WM should take care of it itself. bool wm_usertime_support = false; - extern Time qt_x_user_time; - Time saved_last_input_time = qt_x_user_time; + Time saved_last_input_time = GET_QT_X_USER_TIME(); if ( windowArgs.lowerWindow ) { NETRootInfo wm_info( qt_xdisplay(), NET::Supported ); @@ -1303,7 +1302,7 @@ void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs // *sigh*, and I thought nobody would need TQWidget::dontFocusOnShow(). // Avoid Qt's support for user time by setting it to 0, and // set the property ourselves. - qt_x_user_time = 0; + SET_QT_X_USER_TIME(0); KWin::setUserTime( mainWindow->winId(), 0 ); } // Put below the current window before showing, in case that actually works with the WM. @@ -1316,7 +1315,7 @@ void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs if ( windowArgs.lowerWindow ) { - qt_x_user_time = saved_last_input_time; + SET_QT_X_USER_TIME(saved_last_input_time); if( !wm_usertime_support ) { // No WM support. Let's try ugly tricks. mainWindow->lower(); @@ -5815,8 +5814,7 @@ void KonqMainWindow::resetWindow() static Atom atom = XInternAtom( qt_xdisplay(), "_KDE_NET_WM_USER_CREATION_TIME", False ); XChangeProperty( qt_xdisplay(), winId(), atom, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &x_time, 1); - extern Time qt_x_user_time; // reset also user time, so that this window - qt_x_user_time = CurrentTime; // won't have _NET_WM_USER_TIME set + SET_QT_X_USER_TIME(CurrentTime); // won't have _NET_WM_USER_TIME set #if !KDE_IS_VERSION( 3, 2, 90 ) // _KDE_NET_USER_TIME is obsolete static Atom atom2 = XInternAtom( qt_xdisplay(), "_KDE_NET_USER_TIME", False ); timeval tv; |