From 3ed3ff2edbbbe385bbd98b2633fdae7cb837b9ff Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 26 Dec 2024 20:57:53 +0100 Subject: [PATCH] graphics/fbcond: Handle framebuffer resize during handoff --- graphics/fbcond/src/display.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graphics/fbcond/src/display.rs b/graphics/fbcond/src/display.rs index 46785796df..053b585563 100644 --- a/graphics/fbcond/src/display.rs +++ b/graphics/fbcond/src/display.rs @@ -61,11 +61,13 @@ impl Display { let (mut new_display_file, width, height) = Self::open_display(&self.input_handle).unwrap(); - eprintln!("fbcond: Opened new display"); + eprintln!("fbcond: Opened new display with size {width}x{height}"); match display_fd_map(width, height, &mut new_display_file) { Ok(offscreen) => { self.offscreen = offscreen; + self.width = width; + self.height = height; self.display_file = new_display_file; eprintln!("fbcond: Mapped new display"); @@ -108,6 +110,8 @@ impl Display { match display_fd_map(width, height, &mut self.display_file) { Ok(offscreen) => { self.offscreen = offscreen; + self.width = width; + self.height = height; } Err(err) => { eprintln!("failed to resize display to {}x{}: {}", width, height, err);