diff --git a/extra/swayimgrc b/extra/swayimgrc index ff8f50e..067c878 100644 --- a/extra/swayimgrc +++ b/extra/swayimgrc @@ -41,8 +41,6 @@ transparency = grid scale = optimal # Fix position of the image on the window surface (yes/no) fixed = yes -# Reset position and scale on window resize -resize_reset = yes # Anti-aliasing (yes/no) antialiasing = no # Run slideshow at startup (yes/no) diff --git a/extra/swayimgrc.5 b/extra/swayimgrc.5 index 73fbd3f..c182ae5 100644 --- a/extra/swayimgrc.5 +++ b/extra/swayimgrc.5 @@ -99,9 +99,6 @@ Default image scale, valid modes are: .IP "\fBfixed\fR = \fI[yes|no]\fR" Fix position of the image on the window surface, \fIyes\fR by default. .\" ---------------------------------------------------------------------------- -.IP "\fBresize_reset\fR = \fI[yes|no]\fR" -Reset position and scale on window resize, \fIyes\fR by default. -.\" ---------------------------------------------------------------------------- .IP "\fBantialiasing\fR = \fI[yes|no]\fR" Enable or disable antialising (better quality, but slow rendering), \fIno\fR by default. .\" ---------------------------------------------------------------------------- diff --git a/src/viewer.c b/src/viewer.c index 8f58629..933b37c 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -31,7 +31,6 @@ #define CFG_TRANSPARENCY_DEF GRID_NAME #define CFG_SCALE_DEF "optimal" #define CFG_FIXED_DEF true -#define CFG_RESETRSZ_DEF true #define CFG_ANTIALIASING_DEF false #define CFG_SLIDESHOW_DEF false #define CFG_SLIDESHOW_TIME_DEF 3 @@ -71,7 +70,6 @@ struct viewer { argb_t window_bkg; ///< Window background mode/color bool antialiasing; ///< Anti-aliasing mode on/off bool fixed; ///< Fix image position - bool resize_reset; ///< Reset position and scale in window resize enum fixed_scale scale_init; ///< Initial scale float scale; ///< Current scale factor of the image @@ -550,9 +548,7 @@ static void redraw(void) static void on_resize(void) { fixup_position(false); - if (ctx.resize_reset || ctx.scale == 0) { - reset_state(); - } + reset_state(); } /** @@ -666,8 +662,6 @@ void viewer_init(struct config* cfg, struct image* image) ctx.fixed = config_get_bool(cfg, VIEWER_SECTION, VIEWER_FIXED, CFG_FIXED_DEF); - ctx.resize_reset = - config_get_bool(cfg, VIEWER_SECTION, VIEWER_RESETRSZ, CFG_RESETRSZ_DEF); ctx.antialiasing = config_get_bool(cfg, VIEWER_SECTION, VIEWER_ANTIALIASING, CFG_ANTIALIASING_DEF); ctx.window_bkg = diff --git a/src/viewer.h b/src/viewer.h index 53d1125..8328cd9 100644 --- a/src/viewer.h +++ b/src/viewer.h @@ -14,7 +14,6 @@ #define VIEWER_TRANSPARENCY "transparency" #define VIEWER_SCALE "scale" #define VIEWER_FIXED "fixed" -#define VIEWER_RESETRSZ "resize_reset" #define VIEWER_ANTIALIASING "antialiasing" #define VIEWER_SLIDESHOW "slideshow" #define VIEWER_SLIDESHOW_TIME "slideshow_time"