summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hult <richard@imendio.com>2007-06-30 19:55:20 +0000
committerRichard Hult <rhult@src.gnome.org>2007-06-30 19:55:20 +0000
commitee283b058af94ce0b3812951954d826e9e77dcd9 (patch)
tree705b7ad766c7402daf87f20a9e035b1a632e3fb9
parenta598c633b518d362a30afda3cca351ed77bc7330 (diff)
downloadgdk-pixbuf-ee283b058af94ce0b3812951954d826e9e77dcd9.tar.gz
Simplify (get the origin directly from the window).
2007-06-30 Richard Hult <richard@imendio.com> * gdk/quartz/gdkevents-quartz.c: (synthesize_crossing_events_for_ns_event): Simplify (get the origin directly from the window). svn path=/trunk/; revision=18315
-rw-r--r--ChangeLog6
-rw-r--r--gdk/quartz/gdkevents-quartz.c10
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 22674c478..d17989423 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2007-06-30 Richard Hult <richard@imendio.com>
+ * gdk/quartz/gdkevents-quartz.c:
+ (synthesize_crossing_events_for_ns_event): Simplify (get the
+ origin directly from the window).
+
+2007-06-30 Richard Hult <richard@imendio.com>
+
* gdk/quartz/gdkevents-quartz.c: (create_crossing_event),
(synthesize_crossing_events), (find_mouse_window_for_ns_event),
(synthesize_crossing_events_for_ns_event): No need to special case
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 829319fbd..86e1579ff 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -1124,7 +1124,7 @@ synthesize_crossing_events_for_ns_event (NSEvent *nsevent)
mouse_window,
&x, &y);
- synthesize_crossing_events (mouse_window, GDK_CROSSING_NORMAL, nsevent, x, y);
+ synthesize_crossing_events (mouse_window, GDK_CROSSING_NORMAL, nsevent, x, y);
}
break;
@@ -1133,7 +1133,6 @@ synthesize_crossing_events_for_ns_event (NSEvent *nsevent)
GdkWindow *event_toplevel;
GdkWindowImplQuartz *impl;
NSPoint point;
- gint x_orig, y_orig;
/* We only use NSMouseExited when leaving to the root
* window. The other cases are handled above by checking the
@@ -1150,11 +1149,8 @@ synthesize_crossing_events_for_ns_event (NSEvent *nsevent)
x = point.x;
y = impl->height - point.y;
- if (gdk_window_get_origin (event_toplevel, &x_orig, &y_orig))
- {
- x += x_orig;
- y += y_orig;
- }
+ x += GDK_WINDOW_OBJECT (event_toplevel)->x;
+ y += GDK_WINDOW_OBJECT (event_toplevel)->y;
/* Check if the root window has a child at this position, if
* so ignore the event since it means we didn't exit to the