From d6056111d93c8dde985bb5007f4c03e095aff2c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 28 Aug 2024 13:49:11 +0400 Subject: [PATCH] rdp: update comments 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 | 1 + qemu-rdp/src/server/display/queue.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-rdp/src/server/display.rs b/qemu-rdp/src/server/display.rs index 6f2d474..d09ac8d 100644 --- a/qemu-rdp/src/server/display.rs +++ b/qemu-rdp/src/server/display.rs @@ -68,6 +68,7 @@ impl RdpServerDisplay for DisplayHandler { fn request_layout(&mut self, layout: DisplayControlMonitorLayout) { let console = self.console.proxy.clone(); + // TODO: use a queue and a dedicated task/thread for requests, to preserve order thread::spawn(move || { // TODO: multi-monitor let Some(monitor) = layout.monitors().first() else { diff --git a/qemu-rdp/src/server/display/queue.rs b/qemu-rdp/src/server/display/queue.rs index 1fbcaef..189b40c 100644 --- a/qemu-rdp/src/server/display/queue.rs +++ b/qemu-rdp/src/server/display/queue.rs @@ -117,7 +117,7 @@ fn push_update(queue: &mut MutexGuard>, item: DisplayUpd } } ColorPointer(_) | RGBAPointer(_) | HidePointer | DefaultPointer => { - // If there is already a pointer position update in the queue, replace it with the new one + // If there is already a pointer shape update in the queue, replace it with the new one if let Some(idx) = queue.iter().position(|update| { matches!( update,