aboutsummaryrefslogtreecommitdiff
path: root/src/idocalendarmenuitem.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-16 12:40:03 -0500
committerTed Gould <ted@gould.cx>2011-09-16 12:40:03 -0500
commit8d56d16eb7b4af02d84a683c9792ca218ed81980 (patch)
tree08f1b01ba5548eeeeae0f717cd1f9fe5ab532185 /src/idocalendarmenuitem.c
parent8ca02b8e62853b79feee7e8a2b38fa680a7de12e (diff)
downloadayatana-ido-8d56d16eb7b4af02d84a683c9792ca218ed81980.tar.gz
ayatana-ido-8d56d16eb7b4af02d84a683c9792ca218ed81980.tar.bz2
ayatana-ido-8d56d16eb7b4af02d84a683c9792ca218ed81980.zip
Use the root position in the event instead of finding it
Diffstat (limited to 'src/idocalendarmenuitem.c')
-rw-r--r--src/idocalendarmenuitem.c7
1 files 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)) {