summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-04-10 10:00:17 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-04-10 10:00:17 +0200
commit1657b7cedc9021a0b641ba6422bd6d4d3a795246 (patch)
treeec85b3f96a45e89756477df591535714c9b76159 /src
parente35b7ca36f6764206a6676ef4a9e4c197475e023 (diff)
More pointer warping fixes. Everything expect panning on a zoomed image should work now.
Diffstat (limited to 'src')
-rw-r--r--src/events.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/events.c b/src/events.c
index 742f65a..92c01cd 100644
--- a/src/events.c
+++ b/src/events.c
@@ -472,12 +472,12 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
ev->xmotion.y);
winwid->click_offset_x -= winwid->w - 4;
}
- else if ((ev->xmotion.x <= 0) && (winwid->click_offset_x
+ else if ((ev->xmotion.x <= 1) && (winwid->click_offset_x
<= winwid->im_w - winwid->w - 3))
{
XWarpPointer(disp, None, winwid->win, 0, 0, 0, 0,
- winwid->im_w - 4, ev->xmotion.y);
- winwid->click_offset_x += winwid->w - 3;
+ winwid->w - 4, ev->xmotion.y);
+ winwid->click_offset_x += winwid->w - 4;
}
else if ((winwid->h - ev->xmotion.y <= 1)
&& (winwid->click_offset_y >= winwid->h - 4))
@@ -486,12 +486,12 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
ev->xmotion.x, 3);
winwid->click_offset_y -= winwid->h - 4;
}
- else if ((ev->xmotion.y <= 0) && (winwid->click_offset_y
+ else if ((ev->xmotion.y <= 1) && (winwid->click_offset_y
<= winwid->im_h - winwid->h - 3))
{
XWarpPointer(disp, None, winwid->win, 0, 0, 0, 0,
- ev->xmotion.x, winwid->im_h - 4);
- winwid->click_offset_y += winwid->h - 3;
+ ev->xmotion.x, winwid->h - 4);
+ winwid->click_offset_y += winwid->h - 4;
}
if ((winwid->im_x != orig_x)