aboutsummaryrefslogtreecommitdiffstats
path: root/swaylock
diff options
context:
space:
mode:
authorLibravatar Zandr Martin <zandrmartin@gmail.com>2016-12-27 17:54:50 -0600
committerLibravatar Zandr Martin <zandrmartin@gmail.com>2016-12-27 17:54:50 -0600
commitf84217d07c1e9a54d9416014d16c3bb6d09b62d2 (patch)
tree5394070845ba8412f2d6273df4756f057b7e32ea /swaylock
parentUpdate README.md (diff)
downloadsway-f84217d07c1e9a54d9416014d16c3bb6d09b62d2.tar.gz
sway-f84217d07c1e9a54d9416014d16c3bb6d09b62d2.tar.zst
sway-f84217d07c1e9a54d9416014d16c3bb6d09b62d2.zip
fix #971
Diffstat (limited to 'swaylock')
-rw-r--r--swaylock/main.c4
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