diff options
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | commands.c | 20 | ||||
-rw-r--r-- | commands.h | 1 | ||||
-rw-r--r-- | config.def.h | 1 | ||||
-rw-r--r-- | sxiv.1 | 9 | ||||
-rw-r--r-- | window.c | 33 | ||||
-rw-r--r-- | window.h | 1 |
7 files changed, 5 insertions, 65 deletions
@@ -149,10 +149,9 @@ of small previews is displayed, making it easy to choose an image to open. {,} Decrease/increase gamma Ctrl-g Reset gamma - s Toggle slideshow or set delay to [count] seconds - a Toggle anti-aliasing - W Resize window to fit image + + s Toggle slideshow or set delay to [count] seconds **Mouse button mappings:** @@ -441,26 +441,6 @@ cmdreturn_t i_fit_to_win(arg_t a) return CMD_INVALID; } -cmdreturn_t i_fit_to_img(arg_t a) -{ - int x, y; - unsigned int w, h; - cmdreturn_t ret = CMD_INVALID; - - if (mode == MODE_IMAGE) { - 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 ((ret = win_moveresize(&win, x, y, w, h))) { - img.x = x - win.x; - img.y = y - win.y; - img.dirty = true; - } - } - return ret; -} - cmdreturn_t i_rotate(arg_t a) { degree_t degree = (degree_t) a; @@ -70,7 +70,6 @@ cmdreturn_t i_drag(arg_t); cmdreturn_t i_zoom(arg_t); cmdreturn_t i_set_zoom(arg_t); cmdreturn_t i_fit_to_win(arg_t); -cmdreturn_t i_fit_to_img(arg_t); cmdreturn_t i_rotate(arg_t); cmdreturn_t i_flip(arg_t); cmdreturn_t i_slideshow(arg_t); diff --git a/config.def.h b/config.def.h index 8c2c7ed..8b835db 100644 --- a/config.def.h +++ b/config.def.h @@ -141,7 +141,6 @@ static const keymap_t keys[] = { { 0, XK_w, i_fit_to_win, (arg_t) SCALE_FIT }, { 0, XK_e, i_fit_to_win, (arg_t) SCALE_WIDTH }, { 0, XK_E, i_fit_to_win, (arg_t) SCALE_HEIGHT }, - { 0, XK_W, i_fit_to_img, (arg_t) None }, { 0, XK_less, i_rotate, (arg_t) DEGREE_270 }, { 0, XK_greater, i_rotate, (arg_t) DEGREE_90 }, @@ -310,16 +310,13 @@ Increase gamma. Reset gamma. .SS Miscellaneous .TP +.B a +Toggle anti-aliasing. +.TP .B s Toggle slideshow mode and/or set the delay between images to .I count seconds. -.TP -.B a -Toggle anti-aliasing. -.TP -.B W -Resize window to fit image. .SH MOUSE COMMANDS The following mouse mappings are available in image mode: .SS Navigate image list @@ -374,39 +374,6 @@ void win_expose(win_t *win, XExposeEvent *e) e->x, e->y, e->width, e->height, e->x, e->y); } -bool win_moveresize(win_t *win, int x, int y, unsigned int w, unsigned int h) -{ - if (win == NULL || win->xwin == None) - return false; - - /* caller knows nothing about the bar */ - h += win->bar.h; - - x = MAX(0, x); - y = MAX(0, y); - w = MIN(w, win->env.scrw - 2 * win->bw); - h = MIN(h, win->env.scrh - 2 * win->bw); - - if (win->x == x && win->y == y && win->w == w && win->h + win->bar.h == h) - return false; - - win->x = x; - win->y = y; - win->w = w; - win->h = h - win->bar.h; - - win_update_sizehints(win); - - XMoveResizeWindow(win->env.dpy, win->xwin, x, y, w, h); - - if (win->pm != None) { - XFreePixmap(win->env.dpy, win->pm); - win->pm = None; - } - - return true; -} - void win_toggle_fullscreen(win_t *win) { XEvent ev; @@ -86,7 +86,6 @@ void win_close(win_t*); bool win_configure(win_t*, XConfigureEvent*); void win_expose(win_t*, XExposeEvent*); -bool win_moveresize(win_t*, int, int, unsigned int, unsigned int); void win_toggle_fullscreen(win_t*); void win_toggle_bar(win_t*); |