Offset subviews with the parent's abs coordinate

This commit is contained in:
Richard Hult 2009-01-07 15:16:46 +01:00 committed by Alexander Larsson
parent 546a1e4cd6
commit e9d3f22ac8

View File

@ -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;