Commit 6a90c48e authored by Tristan Van Berkom's avatar Tristan Van Berkom

GdkOffscreenWindow: Implement gdk_window_get_frame_extents()

This avoids crashes in gtk_window_get_position() whenever the GdkWindow
is offscreen.
parent 4e1c9f16
......@@ -713,6 +713,16 @@ gdk_offscreen_window_process_updates_recurse (GdkWindow *window,
_gdk_window_process_updates_recurse (window, region);
}
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)
{
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment