Krolyxon
Commit 09335fd

Branches

Refs →

nsxiv09335fd

Fixed offsets in resize win to image

Author
Bert
Date
2011-02-19 22:53 +0100
Parent
fbfec45
Commit
09335fdc1404de66849ee0232596978e9f234490

+3 −3

2 files changed

  1. M Makefile +1 −1
  2. M main.c +2 −2
M Makefile View
@@ -1,6 +1,6 @@
11 all: sxiv
22
3−VERSION=git-20110217
3+VERSION=git-20110219
44
55 CC?=gcc
66 PREFIX?=/usr/local
M main.c View
@@ -344,8 +344,8 @@ void on_keypress(XKeyEvent *kev) {
344344 /* render on next configurenotify */
345345 break;
346346 case XK_W:
347− x = win.x + img.x;
348− y = win.y + img.y;
347+ x = MAX(0, win.x + img.x);
348+ y = MAX(0, win.y + img.y);
349349 w = img.w * img.zoom;
350350 h = img.h * img.zoom;
351351 if ((changed = win_moveresize(&win, x, y, w, h))) {