[compiz] Bug with kde applications and damageWindowRect wrapping...

David Reveman davidr at novell.com
Thu Apr 19 08:54:43 PDT 2007


On Thu, 2007-04-19 at 09:33 +0200, Danny Baumann wrote:
> Hi,
> 
> > > > > If someone can confirm this bug ...
> > > > > Run this in an xterm with smart placement method: 
> > > > > while true; do konsole & sleep 1; killall konsole; done
> > > > > 
> > > > > Look at the screen, you should randomly see the bug at konsole window
> > > > > mapping...
> > > > 
> > > > The placement plugin is broken. It shouldn't place windows when they
> > > > first appear but instead when we get the map request and before they are
> > > > mapped.
> > > > 
> > > > This bug is only visible in kde apps as kde doesn't support the sync
> > > > request protocol.
> > > 
> > > So you mean something like the attached patch?
> > > Let me know if it's correct and it works for you - it does for me ;-)
> > 
> > Something like that but I think we want this to hook in after we've
> > applied the startup properties (event.c:1868) and we'll have to add a
> > PlaceWindowProc screen function to do that properly.
> 
> This would then be something like the attached patch. However, we still
> need to update the decoration on MapRequest before core handles it
> (currrently, we do it after core) so w->input has the correct values
> when the window is placed. A patch for that is also attached.
> Do you agree to that?


- add-place-window-proc.diff

This line in the place plugins placeWindow function:

if (!w->placed && !w->attrib.override_redirect)

should be removed. The "if (!w->placed)" check should be moved to
event.c so the patch will look like this:

                applyStartupProperties (w->screen, w);

+               if (!w->placed)
+                   (*w->screen->placeWindow) (w);
+
                w->pendingMaps++;
 

I also think it makes sense to make PlaceWindowProc look like this:

typedef void (*PlaceWindowProc) (CompWindow *window,
                                 int        x,
                                 int        y,
                                 int        *newX,
                                 int        *newY);

as it allows the core to eventually apply that position change as part
of some other configure request.


- place-fix-decoration.diff

Yes we need this change but there's missing break statement before "case
MapRequest:". I know it was missing before this change too but it didn't
cause any harm then.

- David



More information about the compiz mailing list