Skip to content

Commit

Permalink
fixup r24470: after figuring out the correct screen dimensions, updat…
Browse files Browse the repository at this point in the history
…e the dpi values

git-svn-id: https://xpra.org/svn/Xpra/trunk@24535 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 30, 2019
1 parent 7bcb0ac commit 13fe45e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xpra/gtk_common/gtk_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ def dpi(size_pixels, size_mm):
if n_monitors>0:
wmm = sum(display.get_monitor(i).get_width_mm() for i in range(n_monitors))
hmm = sum(display.get_monitor(i).get_height_mm() for i in range(n_monitors))
xdpi = dpi(sw, wmm)
ydpi = dpi(sh, hmm)
if xdpi<MIN_DPI or xdpi>MAX_DPI or ydpi<MIN_DPI or ydpi>MAX_DPI:
#still invalid, generate one from DPI=96
wmm = iround(sw*25.4/96)
Expand Down
2 changes: 2 additions & 0 deletions src/xpra/server/source/clientdisplay_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def dpi(size_pixels, size_mm):
#[plug_name, xs(geom.x), ys(geom.y), xs(geom.width), ys(geom.height), wmm, hmm]
wmm = sum(monitor[5] for monitor in monitors)
hmm = sum(monitor[6] for monitor in monitors)
xdpi = dpi(sw, wmm)
ydpi = dpi(sh, hmm)
if xdpi<MIN_DPI or xdpi>MAX_DPI or ydpi<MIN_DPI or ydpi>MAX_DPI:
#still invalid, generate one from DPI=96
wmm = iround(sw*25.4/96)
Expand Down

0 comments on commit 13fe45e

Please sign in to comment.