From 91209af8da86e5b4ae18bad34e173a487aa3f42e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 6 Sep 2021 10:01:16 -0700 Subject: [PATCH] window: fix default dpi on X11 and Wayland systems Similar to da455cafa12627b5c8bf75dac7898aeb9c755198, the extra connection layer wasn't forwarding the call to the actual impl. closes #947 --- window/src/os/x_and_wayland.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/window/src/os/x_and_wayland.rs b/window/src/os/x_and_wayland.rs index 641e751dd..5e4b1e56c 100644 --- a/window/src/os/x_and_wayland.rs +++ b/window/src/os/x_and_wayland.rs @@ -114,6 +114,14 @@ impl ConnectionOps for Connection { } } + fn default_dpi(&self) -> f64 { + match self { + Self::X11(x) => x.default_dpi(), + #[cfg(feature = "wayland")] + Self::Wayland(w) => w.default_dpi(), + } + } + fn run_message_loop(&self) -> anyhow::Result<()> { match self { Self::X11(x) => x.run_message_loop(),