Re: implementation for gdk_window_get_geometry() in gdk-quartz.



Taybin Rutkin wrote:
-----Original Message-----
From: Richard Hult <richard imendio com>
Taybin Rutkin skrev:
This is an implementation I came up with for gdk_window_get_geometry() in gdkwindow-quartz.c:
Hi, and thanks :)

This looks like a good start. I wonder if we perhaps should try to mimic the X11 backend more closely and get the geometry from the NSWindow instead of using get_position/get_size that use the latest cached value? I think that you also need to check for a destroyed window (and perhaps special-case the root window).

Well, according to the docs in http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGdk_1_1Window.html#6833d29726c3d995c39b74310d21326e the x11 behavior isn't desireable.  I changed our code (ardour) to use Drawable::get_size() as suggested, so this issue is kinda moot for me now.
Isn't it the purpose of the function, to ask X for actual geometry as
opposed to what was in the last processed event, like gdk_x11_get_server_time
vs. GDK_CURRENT_TIME? Maybe it doesn't matter on MacOSX
since there is no client-server thing, but the behavior certainly must be the same as on X (real size of toplevel window is this function, and get_size() and friends
get you what's in GtkWidget/GdkDrawable structures, etc.).

Best regards,
Yevgen




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