KWin weirdness?

Michael Pyne mpyne at purinchu.net
Fri Jun 5 04:14:04 BST 2009


Hi all,

I've been dealing with an issue with KWin over the past couple of days which I 
find weird enough to mail here instead of posting to bugs.kde.org just to make 
sure I'm not crazy.

Over the past couple of days (I'm not sure exactly when it started if only 
because I haven't been able to keep my trunk build up to date until recently), 
KWin would "crash" on me mysteriously, seemingly at random.  I later noticed 
that it happened whenever I closed all of the open windows on screen.  
(Closed, not minimized).

I tried to capture the behavior in gdb to backtrace it, but always received 
"Program exited normally".

fredrikh and SadEagle were kind enough to help me out with the issue today 
since I had time to troubleshoot it, and it ends up being that KWin is exiting 
out on a quit event.  There's two things SadEagle was able to find in his grep 
of the Qt tree that would post a quit event, the Last window closed signal in 
QApplication and some SM error handler.  On a hunch, I applied this patch to 
KWin and tried again to reproduce:

kde-svn at midna ~/kde4/kdebase/workspace/kwin $ svn diff
Index: main.cpp
===================================================================
--- main.cpp    (revision 977669)
+++ main.cpp    (working copy)
@@ -248,6 +248,7 @@
         XSynchronize( display(), True );
         kDebug( 1212 ) << "Running KWin in sync mode";
         }
+    setQuitOnLastWindowClosed( false );
     KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
     KSharedConfig::Ptr config = KGlobal::config();
     if( !config->isImmutable() && args->isSet( "lock" ))

Now I'm unable to reproduce the bug with this patch.

My question/dilemma is: What changed?  I can't see anywhere in either the 
Qt/kdelibs/KWin sources that changed recently such that last Window closed 
would take effect.  I *am* running the git version of X.org but I'm not sure 
how that would make a difference.  As far as I can tell QApplication has always 
defaulted quitting on last window closed to true, and KWin has never worried 
about that flag before from the little bit of looking around I was doing on 
websvn.

I even looked on bugs.kde.org and this bug is, so far as I can tell, 
unreported.  Should I commit this "fix" or is the issue somewhere else on my 
end?  (If it helps I've recently completely removed and reinstalled my trunk 
KDE install directory, so it shouldn't be due to stale install files from 
earlier builds).

And also, no desktop effects enabled, using ati-radeon with r500 card if that 
matters at all.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090604/86193426/attachment.sig>


More information about the kde-core-devel mailing list