Bug 246987

Summary: applying window decoration button settings makes KDE inaccessible
Product: [Plasma] kwin Reporter: S. Burmeister <sven.burmeister>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: cfeck, tittiatcoke, wstephenson
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description S. Burmeister 2010-08-07 14:37:35 UTC
Version:           unspecified (using Devel) 
OS:                Linux

If one opens the deco's button settings via right click on a window's title > configure window behaviour > windeco > configure buttons and e.g. adds the "always on top" to the title bar and then clicks on ok or apply the whole GUI is  inaccessible, i.e. the mouse moves but no clicks or keypresses do have any effect. There is no process running wild, it's just inaccessbile.

Restarting KDE and opening the same dialogue shows that the changes have been saved yet they are not applied to the windows, i.e. the buttons shown in the config dialigue as active for the titlebar are not displayed on it.

clicking apply triggers the bug again.

svn1159575

Reproducible: Always
Comment 1 Martin Flöser 2010-08-07 14:51:22 UTC
For which decoration are you trying to add the button? Not all decorations 
support all buttons. Especially Keep Above is a rare button. In general the 
button is working on trunk (e.g. see this screenshot: 
http://picasaweb.google.de/mgraesslin/KWin#5500520604495414930 ) and there 
should be no commit which could have broken the kcm. At least no commit in 
kwin - last commit to the decoration kcm was in May.
Comment 2 Christoph Feck 2010-08-07 15:17:34 UTC
Canfirmed on current trunk, together with Qt from 4.7 branch.

* KWin freezes whenever anything decoration related changes, or the decoration itself changes
* does not happen when compositing is disabled, so whenever I make a change, I have to disable compositing, change deco options, re-enable compositing
* could be Qt 4.7 related, it just hangs waiting for an event

Attached output of gdb during the hang:

#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb545c0b1 in select () at ../sysdeps/unix/syscall-template.S:82
#2  0xb66ffae3 in qt_safe_select (nfds=18, fdread=0x806efe0, fdwrite=0x806f1f4, fdexcept=0x806f408, orig_timeout=
    0xbfdc6aa8) at /local/git/Qt/qt/src/corelib/kernel/qcore_unix.cpp:92
#3  0xb6705e6d in QEventDispatcherUNIX::select (this=0x806ece0, nfds=18, readfds=0x806efe0, writefds=0x806f1f4, exceptfds=
    0x806f408, timeout=0xbfdc6aa8) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_unix.cpp:632
#4  0xb5b0c67a in QEventDispatcherX11::select (this=0x806ece0, nfds=18, readfds=0x806efe0, writefds=0x806f1f4, exceptfds=
    0x806f408, timeout=0xbfdc6aa8) at /local/git/Qt/qt/src/gui/kernel/qeventdispatcher_x11.cpp:188
#5  0xb6704c4a in QEventDispatcherUNIXPrivate::doSelect (this=0x806eee8, flags=..., timeout=0xbfdc6aa8)
    at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_unix.cpp:219
#6  0xb6706c10 in QEventDispatcherUNIX::processEvents (this=0x806ece0, flags=...)
    at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_unix.cpp:919
#7  0xb5b0c4d2 in QEventDispatcherX11::processEvents (this=0x806ece0, flags=...)
    at /local/git/Qt/qt/src/gui/kernel/qeventdispatcher_x11.cpp:152
#8  0xb66cc90d in QEventLoop::processEvents (this=0xbfdc6c8c, flags=...)
    at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:149
#9  0xb66cca51 in QEventLoop::exec (this=0xbfdc6c8c, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:201
#10 0xb66cf29a in QCoreApplication::exec () at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1009
#11 0xb5a423fa in QApplication::exec () at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:3675
#12 0xb764293d in kdemain (argc=2, argv=0xbfdc6f34) at /local/svn/kde/trunk/KDE/kdebase/workspace/kwin/main.cpp:531
#13 0x08048829 in main (argc=2, argv=0xbfdc6f34) at /local/build/KDE/kdebase/workspace/kwin/kwin_dummy.cpp:3
Comment 3 Christoph Feck 2010-08-07 15:24:46 UTC
It also hangs whenever I try to change any other setting (effects, focus options etc), so it is not related to decorations at all. Something must happen when KWin receives an event from systemsettings that it hangs when compositing is enabled.
Comment 4 Martin Flöser 2010-08-07 15:43:06 UTC
Cannot confirm with kwin trunk (other parts of KDE are not up to date) and Qt 
4.6. I'm currently developing on KWin and changeing the settings all the time 
without any noticed problem.

So a candidate would also be the event filter issue? Have you tried with 
todays kde libs?
Comment 5 Christoph Feck 2010-08-07 16:02:08 UTC
I compiled kwin r1148314 and it still freezes, so it looks like the problem is elsewhere. I am running kdelibs r1160177 which has the event filtering reverted. Sven, which Qt version do you use?
Comment 6 S. Burmeister 2010-08-07 16:09:17 UTC
I tried to get the buttons back on the oxygen windeco which should support those buttons. I use libqt4-4.6.3-131.1.i586.

I did not try with todays kdelibs but will retry with the next snapshot of trunk.
Comment 7 Martin Flöser 2010-08-08 13:56:59 UTC
I was just able to reproduce the issue. Killing kwin from SSH made the system 
useable again (how often did the N900 save me already?). Will try to 
investigate.
Comment 8 Will Stephenson 2010-08-22 11:34:16 UTC
I have it with Qt 4.6 and KDE 4.5 branch.  The pointer moves and changes depending on what it hovers, but the windows and the desktop itself are not repainted.

Changing most kwin settings seems to trigger the bug: at least, enabling/disabling any desktop effect, and enabling Tiling triggers it here.

Toggling and reenabling compositing with alt-shift-f12 clears the 'stuck painting' issue
Comment 9 Thomas Lübking 2010-08-22 13:01:41 UTC
this sounds a lot like bug #241402 - just that this would no more be mesa/xorg dri specific (given martin used the nvidia css regarding comment #7) ...

Could this then actually be due to the fbo test as well ... ewww
=\
Comment 10 Martin Flöser 2010-08-26 21:21:42 UTC
I'm pretty sure it's the same bug

*** This bug has been marked as a duplicate of bug 241402 ***