diff options
author | 2016-12-27 17:23:45 -0700 | |
---|---|---|
committer | 2016-12-27 17:23:45 -0700 | |
commit | 1882cb673394303e858642d3f688108400950a6c (patch) | |
tree | 5394070845ba8412f2d6273df4756f057b7e32ea /swaylock/main.c | |
parent | Update README.md (diff) | |
parent | fix #971 (diff) | |
download | sway-1882cb673394303e858642d3f688108400950a6c.tar.gz sway-1882cb673394303e858642d3f688108400950a6c.tar.zst sway-1882cb673394303e858642d3f688108400950a6c.zip |
Merge pull request #1017 from zandrmartin/swaylock-scaling-mode
fix #971
Diffstat (limited to 'swaylock/main.c')
-rw-r--r-- | swaylock/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/swaylock/main.c b/swaylock/main.c index f738b09d..f004a8d5 100644 --- a/swaylock/main.c +++ b/swaylock/main.c | |||
@@ -236,7 +236,7 @@ void render_image(struct window *window, cairo_surface_t *image, enum scaling_mo | |||
236 | case SCALING_MODE_FILL: | 236 | case SCALING_MODE_FILL: |
237 | { | 237 | { |
238 | double window_ratio = (double) wwidth / wheight; | 238 | double window_ratio = (double) wwidth / wheight; |
239 | double bg_ratio = wheight; | 239 | double bg_ratio = width / height; |
240 | 240 | ||
241 | if (window_ratio > bg_ratio) { | 241 | if (window_ratio > bg_ratio) { |
242 | double scale = (double) wwidth / width; | 242 | double scale = (double) wwidth / width; |
@@ -348,7 +348,7 @@ int main(int argc, char **argv) { | |||
348 | " -v, --version Show the version number and quit.\n" | 348 | " -v, --version Show the version number and quit.\n" |
349 | " -i, --image [<output>:]<path> Display the given image.\n" | 349 | " -i, --image [<output>:]<path> Display the given image.\n" |
350 | " -u, --no-unlock-indicator Disable the unlock indicator.\n" | 350 | " -u, --no-unlock-indicator Disable the unlock indicator.\n" |
351 | " -f, --daemonize Detach from the controlling terminal.\n" | 351 | " -f, --daemonize Detach from the controlling terminal.\n" |
352 | " --socket <socket> Use the specified socket.\n"; | 352 | " --socket <socket> Use the specified socket.\n"; |
353 | 353 | ||
354 | 354 | ||