[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kmdi
From: Matt Rogers <mattr () kde ! org>
Date: 2004-12-30 5:26:56
Message-ID: 20041230052656.A98B31C9E1 () office ! kde ! org
[Download RAW message or body]
CVS commit by mattr:
New-patches: mattr@kde.org--2005-kmdi/kmdi--mainline--0--patch-6
Summary: optimize KMdiChildArea::focusTopChild
Keywords:
Provide some optimization in KMdiChildArea::focusTopChild()
by only focusing the child if it doesn't already have focus.
M +14 -13 kmdichildarea.cpp 1.13
--- kdelibs/kmdi/kmdichildarea.cpp #1.12:1.13
@@ -360,11 +360,12 @@ void KMdiChildArea::focusTopChild()
kdDebug( 760 ) << k_funcinfo << "No more child windows left" << endl;
emit lastChildFrmClosed();
- return ;
+ return;
}
- kdDebug( 760 ) << k_funcinfo << "Giving focus to " << lastChild->caption() << endl;
+ if ( !lastChild->m_pClient->hasFocus() )
+ {
//disable the labels of all the other children
QPtrListIterator<KMdiChildFrm> it ( *m_pZ );
- for ( ; ( *it ); +it )
+ for ( ; ( *it ); ++it )
{
if ( ( *it ) != lastChild )
@@ -372,8 +373,8 @@ void KMdiChildArea::focusTopChild()
}
+ kdDebug( 760 ) << k_funcinfo << "Giving focus to " << lastChild->caption() << endl;
lastChild->raise();
-
- if ( !lastChild->m_pClient->hasFocus() )
lastChild->m_pClient->activate();
+ }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic