summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-02-19 22:55:40 +0100
committerBert <ber.t@gmx.com>2011-02-19 22:55:40 +0100
commit26bb005458ec83fbd4d4227b0b092353f3941633 (patch)
tree2eeb93637e5ebf4d96c1c9b3db9d89d8065a0398 /main.c
parenta152f82ce6e010859232f83f466a4c1628bb18ed (diff)
parent09335fdc1404de66849ee0232596978e9f234490 (diff)
downloadnsxiv-26bb005458ec83fbd4d4227b0b092353f3941633.tar.zst
Merge branch 'master' into thumbs
Conflicts: main.c
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index bcc6a58..c1f2b72 100644
--- a/main.c
+++ b/main.c
@@ -368,8 +368,8 @@ void on_keypress(XKeyEvent *kev) {
/* control window */
case XK_W:
- x = win.x + img.x;
- y = win.y + img.y;
+ x = MAX(0, win.x + img.x);
+ y = MAX(0, win.y + img.y);
w = img.w * img.zoom;
h = img.h * img.zoom;
if ((changed = win_moveresize(&win, x, y, w, h))) {