From 8442fa9cc23617c4c741623b137f8a84738f835c Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 17 Apr 2024 22:10:42 +0200 Subject: [PATCH] In debug logging, print 'fixed' values as floats --- wayland-backend/src/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wayland-backend/src/protocol.rs b/wayland-backend/src/protocol.rs index a60f3cf74ae..05796381a32 100644 --- a/wayland-backend/src/protocol.rs +++ b/wayland-backend/src/protocol.rs @@ -126,7 +126,7 @@ impl std::fmt::Display for Argument match self { Self::Int(value) => write!(f, "{}", value), Self::Uint(value) => write!(f, "{}", value), - Self::Fixed(value) => write!(f, "{}", value), + Self::Fixed(value) => write!(f, "{:.4}", *value as f64 / 256.0), Self::Str(value) => write!(f, "{:?}", value), Self::Object(value) => write!(f, "{}", value), Self::NewId(value) => write!(f, "{}", value),