Bug 99832 - start app maximized> restoring does not repaint desktop (XComposite enabled)
Summary: start app maximized> restoring does not repaint desktop (XComposite enabled)
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Thomas Lübking
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-20 00:03 UTC by Mircea Bardac
Modified: 2005-05-31 15:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mircea Bardac 2005-02-20 00:03:27 UTC
Version:           3.4 beta 2 (using KDE KDE 3.3.92)
Installed from:    Unlisted Binary Package

KDE 3.4 beta 2

Composite extension: enabled
Translucent windows & Shadows: checked

0. Take KWrite for example & the desktop filled with apps as in [1]
1. Start an instance as you wish and resize it to make sure it fits the free desktop
2. Close KWrite to save last Window geometry
3. Start KWrite using: "kstart --maximize kwrite" using a Konsole (as in [1] or using Run (Alt+F2))
4. Click restore button 
5. Kwin will place the restored window in the availabe room AND BUG: forget to restore the screen, starting 

Test Cases:
[1] free space in top-left corner -> restored window is put in the top-left corner -> all the screen not repainted
http://mircea.bardac.net/temp/ss1_s.png
http://mircea.bardac.net/temp/ss1_r.png
[2] free space in bottom-left corner, but app doesn't fit -> restored app is placed bottom-left -> only the right of restored window is not repainted
http://mircea.bardac.net/temp/ss2_s.png
http://mircea.bardac.net/temp/ss2_r.png
[3] free space on middle-right area of the screen (top right is intentionally occupied) -> restored window is placed on the right side of the already opened window -> everything placed on the right and at the bottom of the window is not repainted
http://mircea.bardac.net/temp/ss3_s.png
http://mircea.bardac.net/temp/ss3_r.png

I have animation disabled for minimizing/maximizing.

Generalizing the bug:
everything placed on the right or below the window which has just been restored is not repainted.

Surprisingly, there are some apps which, started maximized, experience the bug only on first restore, maximizing and restoring again not producing the bug.
Comment 1 Thomas Lübking 2005-02-20 19:39:23 UTC
for some reason, the windows below the resized one do not get a damage event.
i have an idea why this happens, but no real solution.
please try if you can reproduce this problem using the kstep or the redmond deco.
Comment 2 Mircea Bardac 2005-02-21 15:39:47 UTC
This problem doesn't occur with:
- Keramik
- Laptop
- Modern System
- OpenLook
- Quartz
- RiscOS
- KStep
- Redmond
(got borred and haven't tested with others)

The problems seems to occur with Plastik only (given the above tests).
Comment 3 Thomas Lübking 2005-02-27 21:49:56 UTC
CVS commit by luebking: 



BUGS:99832
BUGS:99833
BUGS:93380
kompmgr now should get proper window shapes, removing several artefact bugs
just swapping two lines in this file


  M +4 -2      geometry.cpp   2.102


--- kdebase/kwin/geometry.cpp  #2.101:2.102
@@ -1607,6 +1607,7 @@ void Client::setGeometry( int x, int y, 
     if( block_geometry == 0 )
         {
-        XMoveResizeWindow( qt_xdisplay(), frameId(), x, y, w, h );
         resizeDecoration( QSize( w, h ));
+        XMoveResizeWindow( qt_xdisplay(), frameId(), x, y, w, h );
+//         resizeDecoration( QSize( w, h ));
         if( !isShade())
             {
@@ -1645,6 +1646,7 @@ void Client::plainResize( int w, int h, 
     if( block_geometry == 0 )
         {
-        XResizeWindow( qt_xdisplay(), frameId(), w, h );
         resizeDecoration( QSize( w, h ));
+        XResizeWindow( qt_xdisplay(), frameId(), w, h );
+//         resizeDecoration( QSize( w, h ));
         if( !isShade())
             {


Comment 4 dierck.hillmann 2005-05-31 15:17:08 UTC
Doesn't seem to be fixed in 3.4.1, though the patch seems to be working (swapped the lines manually).