]> www.fi.muni.cz Git - evince.git/commitdiff
[libview] Correctly compute the position of the annotation window
authorJose Aliste <jose.aliste@gmail.com>
Sun, 25 Jul 2010 19:49:32 +0000 (15:49 -0400)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 26 Jul 2010 09:18:47 +0000 (11:18 +0200)
libview/ev-annotation-window.c

index 6539fd4ff7f707b0a591b577706fe1341375e224..cbed0f74cc4e455678536b16b396551ac33e93e7 100644 (file)
@@ -454,8 +454,8 @@ ev_annotation_window_button_press_event (GtkWidget      *widget,
 
        if (event->type == GDK_BUTTON_PRESS && event->button == 1) {
                window->in_move = TRUE;
-               window->x = event->x;
-               window->y = event->y;
+               window->x = event->x_root - event->x;
+               window->y = event->y_root - event->y;
                gtk_window_begin_move_drag (GTK_WINDOW (widget),
                                            event->button,
                                            event->x_root,