[gtk+/client-side-windows: 137/284] Offset subviews with the parent's abs coordinate
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows: 137/284] Offset subviews with the parent's abs coordinate
- Date: Thu, 2 Apr 2009 14:11:14 -0400 (EDT)
commit e9d3f22ac81489fbee5248d5135355041fedca35
Author: Richard Hult <richard imendio com>
Date: Wed Jan 7 15:16:46 2009 +0100
Offset subviews with the parent's abs coordinate
---
gdk/quartz/gdkwindow-quartz.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 7f94fa7..151f678 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]