diff options
author | Ted Gould <ted@gould.cx> | 2011-09-16 12:40:28 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-09-16 12:40:28 -0500 |
commit | 94ce65a555a0fad7888ec94d1cb9f27c12395ebe (patch) | |
tree | cd8372cb6d273e5b8e27b427d008ef377a551bdf /src | |
parent | 8d56d16eb7b4af02d84a683c9792ca218ed81980 (diff) | |
download | ayatana-ido-94ce65a555a0fad7888ec94d1cb9f27c12395ebe.tar.gz ayatana-ido-94ce65a555a0fad7888ec94d1cb9f27c12395ebe.tar.bz2 ayatana-ido-94ce65a555a0fad7888ec94d1cb9f27c12395ebe.zip |
Use get_origin instead of position and uncomment out our adjustments
Diffstat (limited to 'src')
-rw-r--r-- | src/idocalendarmenuitem.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/idocalendarmenuitem.c b/src/idocalendarmenuitem.c index 994e1e2..aa5314c 100644 --- a/src/idocalendarmenuitem.c +++ b/src/idocalendarmenuitem.c @@ -226,18 +226,16 @@ ido_calendar_menu_item_button_press (GtkWidget *widget, ((GdkEventButton *)newevent)->window = newwindow; - gdk_window_get_position(newwindow, &winx, &winy); + gdk_window_get_origin(newwindow, &winx, &winy); g_debug("Window position: %dx%d", winx, winy); newx = root_x - winx; newy = root_y - winy; - - if (newx >= 0 && newy >= 0) { - //if (newx >= 0 && newy >= 0 && newx < gdk_window_get_width(newwindow) && newy < gdk_window_get_height(newwindow)) { + if (newx >= 0 && newy >= 0 && newx < gdk_window_get_width(newwindow) && newy < gdk_window_get_height(newwindow)) { gboolean returned = FALSE; g_debug("Simulating event at: %dx%d", newx, newy); - //((GdkEventButton *)newevent)->x = newx; - //((GdkEventButton *)newevent)->y = newy; + ((GdkEventButton *)newevent)->x = newx; + ((GdkEventButton *)newevent)->y = newy; returned = GTK_WIDGET_GET_CLASS(calendar)->button_press_event(GTK_WIDGET(calendar), (GdkEventButton*)newevent); if (returned) { |