From 8d56d16eb7b4af02d84a683c9792ca218ed81980 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 16 Sep 2011 12:40:03 -0500 Subject: Use the root position in the event instead of finding it --- src/idocalendarmenuitem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/idocalendarmenuitem.c b/src/idocalendarmenuitem.c index 4eac1c5..994e1e2 100644 --- a/src/idocalendarmenuitem.c +++ b/src/idocalendarmenuitem.c @@ -213,11 +213,10 @@ ido_calendar_menu_item_button_press (GtkWidget *widget, GdkEvent * newevent = gdk_event_copy((GdkEvent *)(event)); GList * children = gdk_window_get_children(gtk_widget_get_window(calendar)); GList * child; - gint root_x, root_y; - gdk_window_get_position(gtk_widget_get_window(widget), &root_x, &root_y); - root_x += event->x; - root_y += event->y; + gint root_x = event->x_root; + gint root_y = event->y_root; + g_debug("Root X: %d Y: %d", root_x, root_y); for (child = children; child != NULL; child = g_list_next(child)) { -- cgit v1.2.3