[gtk+] GdkOffscreenWindow: Implement gdk_window_get_frame_extents()
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GdkOffscreenWindow: Implement gdk_window_get_frame_extents()
- Date: Sat, 6 Apr 2013 08:16:36 +0000 (UTC)
commit 6a90c48ea60f5cb3929b383f05831b6f63b5f619
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Sat Apr 6 17:09:27 2013 +0900
GdkOffscreenWindow: Implement gdk_window_get_frame_extents()
This avoids crashes in gtk_window_get_position() whenever the GdkWindow
is offscreen.
gdk/gdkoffscreenwindow.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index aed09e0..c765209 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]