From 33925f23cf960a515c7f4f9e0cac9e9bfe0b0906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sun, 28 Jul 2024 11:48:04 +0400 Subject: [PATCH] rdp: forward display resize event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau --- qemu-rdp/src/server/display.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qemu-rdp/src/server/display.rs b/qemu-rdp/src/server/display.rs index 8fa4097..eb2ca2b 100644 --- a/qemu-rdp/src/server/display.rs +++ b/qemu-rdp/src/server/display.rs @@ -63,15 +63,15 @@ impl RdpServerDisplay for DisplayHandler { struct Listener { sender: tokio::sync::mpsc::Sender, - _desktop_size: DesktopSize, + desktop_size: DesktopSize, cursor_hot: (i32, i32), } impl Listener { - fn new(sender: tokio::sync::mpsc::Sender, _desktop_size: DesktopSize) -> Self { + fn new(sender: tokio::sync::mpsc::Sender, desktop_size: DesktopSize) -> Self { Self { sender, - _desktop_size, + desktop_size, cursor_hot: (0, 0), } } @@ -93,10 +93,10 @@ impl ConsoleListenerHandler for Listener { tracing::debug!(?desktop_size); - // if desktop_size != self.desktop_size { - // self.desktop_size = desktop_size; - // self.send(DisplayUpdate::Resize(desktop_size)).await; - // } + if desktop_size != self.desktop_size { + self.desktop_size = desktop_size; + self.send(DisplayUpdate::Resize(desktop_size)).await; + } self.update(Update { x: 0,