From: Guido S. <__g...@we...> - 2005-04-01 17:12:44
|
On Tue, 29 Mar 2005 21:31:14 +0100 Bungee <bu...@er...> wrote: > Well I now know *what8 is happening but not how! > > The problem isn't with kuickshow at all. OroboROX is drawing *all* > windows wrongly! It is failing to allow for the top and left borders > when setting window positions. > > This actually becomes obvious when the geometry infobox is enabled. Well > behaved applications seem to be OK because they faithfully put their > windows where I left them, and as they open for the very first time in > the centre of the window I didn't see that they were actually offset. A > window that appears to be at 0,0 is in reality at 6,18. > > Where kuickshow is concerend (and a few other applications) it *always* > opens its display window at 0,0 and therefore looks wrong while it is > perfectly correct. > > I've had a look for where this may be happening, but with no success. I > found a couple of places where the border width seemed to be set to zero > while everything else had real values, but changing them seemed to make > no difference. > > I hope all this helps find the bug. In X the window decoration is not part of the window. When positioning windows the application can not know the width and height of the frame, so the application tells the window manager how given coords are meant by means of the window gravity flag. Default is NorthWest gravity, by which the app says: window manager, please add the height of the titlebar to y and the width of the left border to x (see clientGravitate()!). I've added the line self.move(0, 0) the the __init__ Contact's main window class and the window is placed correctly, that means window decoration starts at 0,0. I did change the coords to 20,20 and the window is drawn with this offset. Then I tried -20,-20 and the window is drawn as if I passed 0,0. At the moment I don't know - bug or feature? Anyway, maybe you could find out what is kuickshow using for window gravity. It must be doing something funky. Did you send me the kuickshow xprop output? I can't find it. Please send me this file (again?). Might shed some light. I looked at xfwm4's clientGravitate(), and there haven't been done any semantical changes (I have optimized this function for size in OroboROX, the original as still present in xfwm4 was rather wasteful). So I would expect xfwm4 show the same behaviour. The only definite bug in OroboROX is probably that it doesn't take window gravity into account for the geometry box. Currently it draws the coords of the naked application window, which I think is not what is wanted. PS: I read up about initial window positioning in the ICCCM spec, which says the window manager is free to place new windows as it sees fit (e.g. according to a user defined policy). OroboROX currently allows the chosen policy (open in the center/open under pointer) to be overriden by the application. Only when the application doesn't specify a starting position, the initial placement policy kicks in. This just for clarification. |