gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GSSetDevice offset handling


From: Fred Kiefer
Subject: GSSetDevice offset handling
Date: Fri, 02 Mar 2007 15:08:44 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20060911)

This mail is mainly for Richard, but others may have an idea here as well.

In XGServerWindow there is the method windowdevice: that manages some
buffers and then tells the graphics context about the window. This gets
done via a call to GSSetDevice() and the offset of the window is passed
in. I have two issues with this offset. The simpler one is that I think
the second value is the wrong way around. It is computed as
NSHeight(window->xframe) + b
but most likely it should be
NSHeight(window->xframe) - b
or just b
This has been taken care off in all backends, so it wont do any harm.
Still it looks wrong to me.

The other issue is worse, as it may result in wrong drawing. I think the
offset here is needed for the case, where GNUstep and not the window
manager handles the window border. In that case all the drawing will
happen with a certain offset to the X window. When X handles the window
decoration then the offset is of now relevance to the actual drawing, as
we always draw in window coordinates. As far as I can see this method
now does the opposite of this. It sets the offset for the case when X
handles the window decoration in the other case it is 0, 0 (modulo the
above problem.

Now there may be some reason to this and the other backends seem to be
handling this correctly. I just ran into this with the cairo backend,
where there even is a cairo function to define device offset and noticed
a problem.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]