From cbd13c5e2a3c6e1c590bd1af4a35265bb375cc4e Mon Sep 17 00:00:00 2001 From: Funami580 Date: Mon, 16 May 2022 16:15:36 +0200 Subject: [PATCH] wayland: clipboard: fix pasting if active surface id was not set refs: #1385 --- window/src/os/wayland/pointer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/window/src/os/wayland/pointer.rs b/window/src/os/wayland/pointer.rs index 4c059cd10..ebda5c1fb 100644 --- a/window/src/os/wayland/pointer.rs +++ b/window/src/os/wayland/pointer.rs @@ -325,6 +325,9 @@ impl PointerDispatcher { inner .surface_to_pending .insert(surface.as_ref().id(), Arc::clone(pending)); + if inner.active_surface_id == 0 { + inner.active_surface_id = surface.as_ref().id(); + } } pub fn set_cursor(&self, name: &str, serial: Option) {