Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xinit/dist Only set dpi when necessary to avo...



details:   https://anonhg.NetBSD.org/xsrc/rev/7f2386cfb80d
branches:  trunk
changeset: 6984:7f2386cfb80d
user:      nia <nia%NetBSD.org@localhost>
date:      Fri May 27 19:05:28 2022 +0000

description:
Only set dpi when necessary to avoid divide by zero on very small screens

diffstat:

 external/mit/xdm/dist/config/Xsession.in |  4 ++--
 external/mit/xinit/dist/xinitrc.cpp      |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (53 lines):

diff -r ce9c3666abe0 -r 7f2386cfb80d external/mit/xdm/dist/config/Xsession.in
--- a/external/mit/xdm/dist/config/Xsession.in  Fri May 27 18:07:03 2022 +0000
+++ b/external/mit/xdm/dist/config/Xsession.in  Fri May 27 19:05:28 2022 +0000
@@ -1,6 +1,6 @@
 XCOMM!SHELL_CMD
 XCOMM
-XHASH $NetBSD: Xsession.in,v 1.16 2022/05/27 17:58:54 nia Exp $
+XHASH $NetBSD: Xsession.in,v 1.17 2022/05/27 19:05:28 nia Exp $
 
 XCOMM redirect errors to a file in user's home directory if we can
 
@@ -75,7 +75,6 @@
 #ifdef COLOR
 *customization: -color
 #endif
-Xft.dpi: $(/usr/bin/printf '96 * (%d / 16)\n' "$fontsize" | /usr/bin/bc /dev/stdin)
 *VT100.foreground: grey90
 *VT100.background: black
 Bitmap*font:    -*-spleen-medium-r-*-*-$fontsize-*-*-*-*-*-*-*
@@ -95,6 +94,7 @@
 EOF
 if [ $fontsize -gt 18 ]; then
     BINDIR/xrdb -merge - <<EOF
+Xft.dpi: $(/usr/bin/printf '96 * (%d / 16)\n' "$fontsize" | /usr/bin/bc /dev/stdin)
 *VT100.faceName: xft:Monospace:pixelsize=$fontsize
 EOF
 elif [ $fontsize -gt 13 ]; then
diff -r ce9c3666abe0 -r 7f2386cfb80d external/mit/xinit/dist/xinitrc.cpp
--- a/external/mit/xinit/dist/xinitrc.cpp       Fri May 27 18:07:03 2022 +0000
+++ b/external/mit/xinit/dist/xinitrc.cpp       Fri May 27 19:05:28 2022 +0000
@@ -1,5 +1,5 @@
 XCOMM!SHELL_CMD
-XHASH $NetBSD: xinitrc.cpp,v 1.18 2022/05/27 17:58:54 nia Exp $
+XHASH $NetBSD: xinitrc.cpp,v 1.19 2022/05/27 19:05:28 nia Exp $
 
 userresources=$HOME/.Xresources
 usermodmap=$HOME/.Xmodmap
@@ -44,7 +44,6 @@
 XHASH ifdef COLOR
 *customization: -color
 XHASH endif
-Xft.dpi: $(/usr/bin/printf '96 * (%d / 16)\n' "$fontsize" | /usr/bin/bc /dev/stdin)
 *VT100.foreground: grey90
 *VT100.background: black
 *SimpleMenu*font:      -*-spleen-medium-r-*-*-$fontsize-*-*-*-*-*-*-*
@@ -66,6 +65,7 @@
 EOF
 if [ $fontsize -gt 18 ]; then
     XRDB -merge - <<EOF
+Xft.dpi: $(/usr/bin/printf '96 * (%d / 16)\n' "$fontsize" | /usr/bin/bc /dev/stdin)
 *VT100.faceName: xft:Monospace:pixelsize=$fontsize
 EOF
 elif [ $fontsize -gt 13 ]; then



Home | Main Index | Thread Index | Old Index