Roman Kennke wrote:
Hi Tom,

- The code for fetching the frame extents now uses the (new?) GDK
function gdk_window_get_frame_extents() rather than pulling the frame
extents using the extended window property _NET_FRAME_EXTENTS.
This will result in the wrong insets being calculated upon window realization, since gdk_window_get_frame_extents relies on the window being mapped. For now you can ifdef this code based on the presence or absence of X. Ideally though, _NET_FRAME_EXTENTS support would be added to the X11 implementation of gdk_window_get_frame_extents.

Not sure if I understand correctly. Window realization is when the
window object is created, but not yet visible (==mapped), right? In this
case, the _NET_FRAME_EXTENTS thing reports 0-extents, because it doesn't
know yet about the real borders.

The _NET_REQUEST_FRAME_EXTENTS and _NET_FRAME_EXTENTS hints will report all-zero extents on window managers that don't support them. But at least Metacity does support them and will return non-zero results.

This is exactly what
gdk_window_get_frame_extents() does in this case. When the window is
mapped, we receive a callback and fetch the real extents. What's the
difference between _NET_FRAME_EXTENTS and gdk_window_get_frame_extents()
then?

The purpose of the _NET_REQUEST_FRAME_EXTENTS and _NET_FRAME_EXTENTS hints is to provide, before the frame is mapped, the extents that the frame will have when it is mapped.

http://standards.freedesktop.org/wm-spec/1.4/ar01s04.html#id2527060

This eliminates the need to estimate the frame size (guessing at the size of the frame that the window manager will add) then a) adjust the frame size to the correct size after the real-extents callback or b) leave the window at its estimated size.

Tom

Reply via email to