diff options
author | Tristan Van Berkom <tristanvb@openismus.com> | 2013-04-06 17:09:27 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristanvb@openismus.com> | 2013-04-06 17:16:09 +0900 |
commit | 6a90c48ea60f5cb3929b383f05831b6f63b5f619 (patch) | |
tree | 3d99e2b08788c60a806753354822850819407981 | |
parent | 4e1c9f16a036a8b6e379270a2742f32e3f0191d1 (diff) | |
download | gtk+-6a90c48ea60f5cb3929b383f05831b6f63b5f619.tar.gz |
GdkOffscreenWindow: Implement gdk_window_get_frame_extents()
This avoids crashes in gtk_window_get_position() whenever the GdkWindow
is offscreen.
-rw-r--r-- | gdk/gdkoffscreenwindow.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c index aed09e0e83..c765209032 100644 --- a/gdk/gdkoffscreenwindow.c +++ b/gdk/gdkoffscreenwindow.c @@ -714,6 +714,16 @@ gdk_offscreen_window_process_updates_recurse (GdkWindow *window, } static void +gdk_offscreen_window_get_frame_extents (GdkWindow *window, + GdkRectangle *rect) +{ + rect->x = window->x; + rect->y = window->y; + rect->width = window->width; + rect->height = window->height; +} + +static void gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass) { GdkWindowImplClass *impl_class = GDK_WINDOW_IMPL_CLASS (klass); @@ -763,7 +773,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass) impl_class->set_startup_id = gdk_offscreen_window_set_string; impl_class->set_transient_for = gdk_offscreen_window_set_transient_for; impl_class->get_root_origin = NULL; - impl_class->get_frame_extents = NULL; + impl_class->get_frame_extents = gdk_offscreen_window_get_frame_extents; impl_class->set_override_redirect = NULL; impl_class->set_accept_focus = NULL; impl_class->set_focus_on_map = gdk_offscreen_window_set_boolean; |