summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/events.c4
-rw-r--r--src/winwidget.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/events.c b/src/events.c
index 92c01cd..a5af3f2 100644
--- a/src/events.c
+++ b/src/events.c
@@ -473,7 +473,7 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
winwid->click_offset_x -= winwid->w - 4;
}
else if ((ev->xmotion.x <= 1) && (winwid->click_offset_x
- <= winwid->im_w - winwid->w - 3))
+ <= (winwid->im_w * winwid->zoom) - winwid->w - 3))
{
XWarpPointer(disp, None, winwid->win, 0, 0, 0, 0,
winwid->w - 4, ev->xmotion.y);
@@ -487,7 +487,7 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
winwid->click_offset_y -= winwid->h - 4;
}
else if ((ev->xmotion.y <= 1) && (winwid->click_offset_y
- <= winwid->im_h - winwid->h - 3))
+ <= (winwid->im_h * winwid->zoom) - winwid->h - 3))
{
XWarpPointer(disp, None, winwid->win, 0, 0, 0, 0,
ev->xmotion.x, winwid->h - 4);
diff --git a/src/winwidget.h b/src/winwidget.h
index 47ebfcc..dd24f8f 100644
--- a/src/winwidget.h
+++ b/src/winwidget.h
@@ -100,7 +100,7 @@ struct __winwidget {
/* New stuff */
int im_x; /* image offset from window top left */
int im_y; /* image offset from window top left */
- double zoom; /* From 0 (not visible) to 100 (actual size)
+ double zoom; /* From 0 (not visible) to 1.00 (actual size)
all the way up to INT_MAX (ouch) */
int click_offset_x;
int click_offset_y;