From e9d3f22ac81489fbee5248d5135355041fedca35 Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Wed, 7 Jan 2009 15:16:46 +0100 Subject: [PATCH] Offset subviews with the parent's abs coordinate --- gdk/quartz/gdkwindow-quartz.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index 7f94fa7380..151f6784a9 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -923,7 +923,10 @@ _gdk_window_impl_new (GdkWindow *window, if (!private->input_only) { - NSRect frame_rect = NSMakeRect (private->x, private->y, private->width, private->height); + NSRect frame_rect = NSMakeRect (private->x + private->parent->abs_x, + private->y + private->parent->abs_y, + private->width, + private->height); impl->view = [[GdkQuartzView alloc] initWithFrame:frame_rect]; @@ -1835,6 +1838,8 @@ _gdk_windowing_window_get_pointer (GdkDisplay *display, gint x_tmp, y_tmp; GdkWindow *found_window; + g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL); + if (GDK_WINDOW_DESTROYED (window)) { *x = 0;