fixed scroll of fullscreen image
authorVladimir Nadvornik <nadvornik@suse.cz>
Tue, 21 Aug 2012 20:31:05 +0000 (22:31 +0200)
committerVladimir Nadvornik <nadvornik@suse.cz>
Tue, 21 Aug 2012 20:31:05 +0000 (22:31 +0200)
src/layout_image.c

index e92dffc..27403ea 100644 (file)
@@ -1496,7 +1496,8 @@ static void layout_image_drag_cb(ImageWindow *imd, GdkEventButton *event, gdoubl
        LayoutWindow *lw = data;
        gdouble sx, sy;
 
-       if (lw->full_screen && lw->image != lw->full_screen->imd)
+       if (lw->full_screen && lw->image != lw->full_screen->imd && 
+           imd != lw->full_screen->imd)
                {
                if (event->state & GDK_CONTROL_MASK)
                        {
@@ -1504,7 +1505,7 @@ static void layout_image_drag_cb(ImageWindow *imd, GdkEventButton *event, gdoubl
                        }
                else
                        {
-                       image_get_scroll_center(lw->split_images[i], &sx, &sy);
+                       image_get_scroll_center(lw->full_screen->imd, &sx, &sy);
                        sx += dx;
                        sy += dy;
                        }