[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Kwin freezes
From: Michael Matz <matzmich () cs ! tu-berlin ! de>
Date: 2000-05-31 0:59:27
[Download RAW message or body]
Hi,
On Tue, 30 May 2000, Rik Hemsley wrote:
> if (!block_focus &&
> options->focusPolicyIsReasonable() &&
> !focus_chain.isEmpty())
> {
> ClientList::ConstIterator it = focus_chain.fromLast();
> do {
> if ((*it)->isVisible()) {
> requestFocus(*it);
> break;
> }
> it--;
> } while (it != focus_chain.begin());
> }
This breaks the loop, if (it==focus_chain.begin()), but before evaluating
begin(). Note that begin() is (unlike end()) an element of the list. Use
something like for(it=bla.fromLast();it!=bla.end(); --it) {}
I think the Qt docu is wrong in saying, that --begin() is undefined, as
then there would be no nice way to recurse backwards. And indeed the
reality is another, --begin()==end(). (At least as I last looked at all
the loops in kwin)
Ciao,
Michael.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic