summaryrefslogtreecommitdiff
path: root/dpi.c
diff options
context:
space:
mode:
authorSimeon Simeonov2024-11-20 14:42:05 +0100
committerSimeon Simeonov2024-11-20 14:42:05 +0100
commit96c4dd93ddc01df0e2c26193af6f425ae594748c (patch)
tree6276453e9803fd73449e2da366f6941a39f607a3 /dpi.c
parent040c13e2b9b59895368930cd74d0943d43418383 (diff)
Sync with upstream
Diffstat (limited to 'dpi.c')
-rw-r--r--dpi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dpi.c b/dpi.c
index 3cb08ee..0fdf88a 100644
--- a/dpi.c
+++ b/dpi.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * vim:ts=4:sw=4:expandtab 2 * vim:ts=4:sw=4:expandtab
3 * 3 *
4 * i3 - an improved dynamic tiling window manager 4 * i3 - an improved tiling window manager
5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE) 5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6 * 6 *
7 */ 7 */
@@ -103,7 +103,8 @@ int logical_px(const int logical) {
103 * systems to 96 dpi in order to get the behavior they expect/are used to, 103 * systems to 96 dpi in order to get the behavior they expect/are used to,
104 * but since we can easily detect this case in code, let’s do it for them. 104 * but since we can easily detect this case in code, let’s do it for them.
105 */ 105 */
106 if ((dpi / 96.0) < 1.25) 106 if ((dpi / 96.0) < 1.25) {
107 return logical; 107 return logical;
108 }
108 return ceil((dpi / 96.0) * logical); 109 return ceil((dpi / 96.0) * logical);
109} 110}