#if Simon Hausmann > On Tue, 30 May 2000, Matt Koss wrote: > > > > For over a week I experience a strange bug. > > When I close the last window on the desktop, kwin freezes. > > I have to quit X immediately( or kill kwin from outside ), because otherwise > > it locks my PC completely. > > > > That last application quits properly, but in the place of the last window > > kwin leaves a grey rectangle. > > I'm experiencing exactly the same problem. As far as I debugged/tested it > I think that kwin segfaults somewhere. This results in drkonqi to be > called, which tries to open up a new window. Oooops, a new window, and > kwin is semi-dead? -> freeze [...] I don't get this problem, but I saw something similar while I was fixing code in kwin/workspace.cpp to make sure that when only one window existed it got focus. I made sure it didn't happen before I checked in the code. Here's the relevant code, in case someone can see something wrong with it. It's supposed to iterate backwards through 'focus_chain', looking for a visible client. If it finds one, it requests focus for it and drops out. 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()); } Rik