Bellegarde Cedric
2007-Apr-12 06:57 UTC
[compiz] Bug with kde applications and damageWindowRect wrapping...
Here is a bug that make me insane since a lot of time. Randomly, when launching an kde application, i can see it appear on screen and then being placed by place plugin. I look at place plugin code and everything looks ok... http://hibbert.univ-lille3.fr/~cbellegarde/PlacementBug.png Here a screenshot of the bug, as you can see, window first appear at this "non placed" position, then, it will be removed and place by place plugin ... As all this is executing fastly, you get a really bad looking effect on screen... But, this only affect kde applications, i can't reproduce this with a gtk application .... Really don't understand what is happening :( 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... Bellegarde Cedric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freedesktop.org/archives/compiz/attachments/20070412/b3110639/attachment.html
David Reveman
2007-Apr-17 14:59 UTC
[compiz] Bug with kde applications and damageWindowRect wrapping...
On Thu, 2007-04-12 at 15:57 +0200, Bellegarde Cedric wrote:> Here is a bug that make me insane since a lot of time. > Randomly, when launching an kde application, i can see it appear on > screen and then being placed by place plugin. > I look at place plugin code and everything looks ok... > > http://hibbert.univ-lille3.fr/~cbellegarde/PlacementBug.png > Here a screenshot of the bug, as you can see, window first appear at > this "non placed" position, then, it will be removed and place by > place plugin ... As all this is executing fastly, you get a really bad > looking effect on screen... > > But, this only affect kde applications, i can't reproduce this with a > gtk application .... > > Really don't understand what is happening :( > > 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. - David
David Reveman
2007-Apr-19 11:42 UTC
[compiz] Bug with kde applications and damageWindowRect wrapping...
On Thu, 2007-04-19 at 19:52 +0200, Danny Baumann wrote:> Hi, > > > - 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++; > > Done in the attached one. > > > 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. > > I have made PlaceWindowProc return Bool to indicate if the window was > actually placed or not (and thus newX and newY are valid).I think we want to have w->placed be set to TRUE in event.c even though the call to PlaceWindowProc returns FALSE. Good otherwise, please commit it.> However, I still have one question: How can core determine if the > position change can be applied later or must be applied straight away? > Because that isn't clear to me yet, the attached patch still does > moveWindow() and syncWindowPosition().That's fine for now. We can improve it later on by making it possible to send any stack/size changes that should be made before the window is mapped in the same 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. > > Yes, obviously ... thanks for spotting that. I will commit it (including > the break; ;-) ) together with the other one once it's ready.Good. Thanks, - David