Bug 161436

Summary: [patch] other desktops' windows not drawn with effects like desktop grid and present windows
Product: [Plasma] kwin Reporter: Sebastian Kuźlak <sebastiankuzlak>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: badshah400, des, drew.m.fisher, ehamberg, fhimpe, jlp, karthik.periagaram, lucas, mail
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch that reverts r800581
Push desktop windows to the bottom of the stack
Push desktop windows to the bottom of the stack, r2

Description Sebastian Kuźlak 2008-04-30 02:34:11 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2.3 
OS:                Linux

to reproduce;
-set "keep thumbnails of hidden windows up to date";
-activate desktop gird plugin;
-start few apps on first desktop
-use show desktop grid and move few windows to desktop 2;
-zoom to desktop 2
-use show desktop grid - result is that we cannot see windows on desktop 1.

PS. is it possible to change mouse button behavior to compizlike? i mean lmb moves windows, rmb zooms in/out?
Comment 1 Kelvie Wong 2008-05-02 06:08:59 UTC
I can confirm that I see this bug on my system as well.
Comment 2 Kelvie Wong 2008-05-11 22:56:12 UTC
With a little investigation, I've found the commit that broke it:

r800581

 Fix handling of stacking order of unmanaged windows. Could maybe use a little
    bit more of optimization.
    BUG: 157878

Reverting this commit fixes this problem for me.

I haven't looked far enough to see what the repercussions are (other than fixing that annoying screensaver bug listed). I'll attach the revert patch for those (like me) that can't stand to be without hidden window updates :)
Comment 3 Kelvie Wong 2008-05-11 22:58:12 UTC
Created attachment 24725 [details]
Patch that reverts r800581

This isn't the solution, of course, but this fixes the hidden thumbnail
problem, but re-introduces the window stacking order problem.  If I have time
I'll look into it further to produce a fix.
Comment 4 Lubos Lunak 2008-05-12 16:49:08 UTC
*** Bug 161932 has been marked as a duplicate of this bug. ***
Comment 5 Lubos Lunak 2008-05-13 11:52:16 UTC
*** Bug 161875 has been marked as a duplicate of this bug. ***
Comment 6 lucas 2008-06-09 15:02:45 UTC
After spending two entire afternoons trying to find the problem for this bug, changing each line one-by-one until the problem occurred, it all just comes down to:

rootStackingOrder() returns a different list when hidden windows are kept up-to-date than when they are not. The only difference that I can see is that all windows on non-active screens are on the bottom of the list, causing Plasma's desktop containment to render on top of them. You can see this by deleting the wallpaper containments from ~/.kde4/share/config/plasma-appletsrc .

I will continue trying to find the cause of this later tonight.
Comment 7 lucas 2008-06-09 15:34:29 UTC
Problem is quite obviously in layers.cpp, Workspace::propagateClients()

// when having hidden previews, stack hidden windows below everything else
// (as far as pure X stacking order is concerned), in order to avoid having
// these windows that should be unmapped to interfere with other windows
Comment 8 lucas 2008-06-11 18:15:44 UTC
*** Bug 162972 has been marked as a duplicate of this bug. ***
Comment 9 lucas 2008-06-15 10:06:54 UTC
Created attachment 25349 [details]
Push desktop windows to the bottom of the stack

This seems to fix it without causing bug 157878.
Comment 10 Kelvie Wong 2008-06-25 05:27:38 UTC
I can confirm that the patch from comment #9 fixes it.
Comment 11 Drew Fisher 2008-07-03 23:57:21 UTC
*** Bug 165662 has been marked as a duplicate of this bug. ***
Comment 12 Drew Fisher 2008-07-04 00:17:15 UTC
This bug is the root cause of missing windows from other desktops in the Present Windows plugin as well as in Desktop Grid.  I've had the patch from comment #9 applied in my builds for two weeks now with no issues.
Comment 13 lucas 2008-07-04 10:02:57 UTC
*** Bug 165694 has been marked as a duplicate of this bug. ***
Comment 14 lucas 2008-07-04 11:59:32 UTC
Created attachment 25831 [details]
Push desktop windows to the bottom of the stack, r2

Looped the wrong way.
Comment 15 Lubos Lunak 2008-07-04 16:05:56 UTC
*** Bug 162972 has been marked as a duplicate of this bug. ***
Comment 16 Lubos Lunak 2008-07-04 16:06:51 UTC
SVN commit 828060 by lunakl:

Use KWin's internal stacking order for managed windows, not the X one.
Fixes composited drawing of windows on other desktops.
BUG: 161436



 M  +1 -1      composite.cpp  
 M  +5 -4      layers.cpp  
 M  +1 -1      workspace.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=828060