def _get_randr_dpi(): try: from xpra.x11.bindings.randr_bindings import RandRBindings #@UnresolvedImport randr_bindings = RandRBindings() wmm, hmm = randr_bindings.get_screen_size_mm() w, h = randr_bindings.get_screen_size() dpix = iround(w * 25.4 / wmm) dpiy = iround(h * 25.4 / hmm) screenlog("xdpi=%s, ydpi=%s - size-mm=%ix%i, size=%ix%i", dpix, dpiy, wmm, hmm, w, h) return dpix, dpiy except Exception as e: screenlog.warn("failed to get dpi: %s", e) return -1, -1
def _get_randr_dpi(): try: from xpra.x11.bindings.randr_bindings import RandRBindings #@UnresolvedImport randr_bindings = RandRBindings() wmm, hmm = randr_bindings.get_screen_size_mm() w, h = randr_bindings.get_screen_size() dpix = iround(w * 25.4 / wmm) dpiy = iround(h * 25.4 / hmm) screenlog("dpix=%s, dpiy=%s", dpix, dpiy) return dpix, dpiy except Exception as e: screenlog.warn("failed to get dpi: %s", e) return -1, -1
def _get_randr_dpi(): try: from xpra.x11.bindings.randr_bindings import RandRBindings #@UnresolvedImport randr_bindings = RandRBindings() wmm, hmm = randr_bindings.get_screen_size_mm() w, h = randr_bindings.get_screen_size() dpix = int(w * 25.4 / wmm + 0.5) dpiy = int(h * 25.4 / hmm + 0.5) screenlog("dpix=%s, dpiy=%s", dpix, dpiy) return dpix, dpiy except Exception as e: screenlog.warn("failed to get dpi: %s", e) return -1, -1
def _get_randr_dpi(): if RANDR_DPI and not is_Wayland(): from xpra.gtk_common.error import xlog from xpra.x11.bindings.randr_bindings import RandRBindings #@UnresolvedImport with xlog: randr_bindings = RandRBindings() wmm, hmm = randr_bindings.get_screen_size_mm() w, h = randr_bindings.get_screen_size() dpix = iround(w * 25.4 / wmm) dpiy = iround(h * 25.4 / hmm) screenlog("xdpi=%s, ydpi=%s - size-mm=%ix%i, size=%ix%i", dpix, dpiy, wmm, hmm, w, h) return dpix, dpiy return -1, -1
def _get_randr_dpi(): try: from xpra.gtk_common.error import xsync from xpra.x11.bindings.randr_bindings import RandRBindings #@UnresolvedImport with xsync: randr_bindings = RandRBindings() wmm, hmm = randr_bindings.get_screen_size_mm() w, h = randr_bindings.get_screen_size() dpix = iround(w * 25.4 / wmm) dpiy = iround(h * 25.4 / hmm) screenlog("xdpi=%s, ydpi=%s - size-mm=%ix%i, size=%ix%i", dpix, dpiy, wmm, hmm, w, h) return dpix, dpiy except Exception as e: screenlog.warn("failed to get dpi: %s", e) return -1, -1