> Le 28/04/2012 00:08, Fred Kiefer a écrit :
>> Thank you for running this analysis. It looks like the
>> XTranslateCoordinates call produces incorrect results. I don't have the
>> time to look into this until early next week. Perhaps you are able to
>> find out what goes wrong in line 853 yourself until then.
> As I have zero experience with X, here's some more data. The 3 attached
> files contain the result of the same action (close the preferences
> panel) with GNU-Debug=NSEvent under unity, windowmaker and blackbox,
> with the following debug patch applied.
> The bug only happens under unity, which is clearly doing a lot more work
> and using rarely used code paths in gnustep back. Maybe being a
> compositing manager explains all this.
> One thing I don't understand is why we are reacting to ConfigureNotify
> and sending NSEvents even when the window is not visible. Just adding a
> test on cWin->map_state == IsViewable like below 'fixes' the bug for me.
> Anyway, XTranslateCoordinates returns 0 for x and y (no idea why)
> _XFrameToOSFrame: substract 1 for the window border and voila, x = -1. I
> tried checking XTranslateCoordinates return value but there are no errors.
Not handling move and reparenting events when the window is not visible
sounds like a great idea to me. The only problem is that we would need
to test this with each and every window manager that we support :-(
A saver solution might be to just not save the window frame in the event
handling code of NSWindow, when the window isn't visible. Could you
please test this and report back the results?
It definitely isn't a complete solutions, as the stored frame will be
wrong as long as the window isn't visible, but we could get away with a
lot less testing.