From 0057d19453d03cd7d3cbb39578c791bb986fd120 Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Mon, 28 May 2007 20:20:46 +0000 Subject: [PATCH] Add comments about what various coordinates are relative to. 2007-05-28 Richard Hult * gdk/quartz/gdkwindow-quartz.c: Add comments about what various coordinates are relative to. svn path=/trunk/; revision=17965 --- ChangeLog | 5 +++++ gdk/quartz/gdkwindow-quartz.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33df163a5f..6f67155240 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-28 Richard Hult + + * gdk/quartz/gdkwindow-quartz.c: Add comments about what various + coordinates are relative to. + 2007-05-28 Carlos Garnacho * gtk/gtkwidget.c (gtk_widget_propagate_hierarchy_changed_recurse): diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index 07ecd3c1eb..6dbf404c4d 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -43,8 +43,8 @@ gdk_quartz_window_get_nsview (GdkWindow *window) static void gdk_window_impl_quartz_get_size (GdkDrawable *drawable, - gint *width, - gint *height) + gint *width, + gint *height) { g_return_if_fail (GDK_IS_WINDOW_IMPL_QUARTZ (drawable)); @@ -431,7 +431,9 @@ get_default_title (void) return title; } -/* FIXME: Should probably be in screen instead. */ +/* FIXME: It would be nice to have one function that takes an NSPoint + * and flips the coords for any window. + */ gint _gdk_quartz_window_get_inverted_screen_y (gint y) { @@ -911,7 +913,7 @@ move_resize_window_internal (GdkWindow *window, { NSRect content_rect = NSMakeRect (private->x, - _gdk_quartz_window_get_inverted_screen_y (private->y) , + _gdk_quartz_window_get_inverted_screen_y (private->y), impl->width, impl->height); NSRect frame_rect = [impl->toplevel frameRectForContentRect:content_rect]; @@ -1206,6 +1208,7 @@ gdk_window_get_root_origin (GdkWindow *window, *y = rect.y; } +/* Returns coordinates relative to the root. */ void _gdk_windowing_get_pointer (GdkDisplay *display, GdkScreen **screen, @@ -1219,7 +1222,7 @@ _gdk_windowing_get_pointer (GdkDisplay *display, _gdk_windowing_window_get_pointer (_gdk_display, _gdk_root, x, y, mask); } -/* Returns coordinates relative to the upper left corner of window. */ +/* Returns coordinates relative to the passed in window. */ GdkWindow * _gdk_windowing_window_get_pointer (GdkDisplay *display, GdkWindow *window, @@ -1286,6 +1289,7 @@ gdk_display_warp_pointer (GdkDisplay *display, CGDisplayMoveCursorToPoint (CGMainDisplayID (), CGPointMake (x, y)); } +/* Returns coordinates relative to the found window. */ GdkWindow * _gdk_windowing_window_at_pointer (GdkDisplay *display, gint *win_x,