From 2e2ca3eda0f695fd57168c251101c9851935cb92 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Thu, 27 Mar 2025 17:41:30 +0100 Subject: [PATCH] xwayland: Allow pasting into fullscreen surfaces --- src/xwayland.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/xwayland.rs b/src/xwayland.rs index 93b0e4b1..d3ae7a6c 100644 --- a/src/xwayland.rs +++ b/src/xwayland.rs @@ -146,10 +146,18 @@ impl Common { .last_active() .get_keyboard() { - if let Some(KeyboardFocusTarget::Element(mapped)) = keyboard.current_focus() { - if let Some(surface) = mapped.active_window().x11_surface() { - return surface.xwm_id().unwrap() == xwm; + match keyboard.current_focus() { + Some(KeyboardFocusTarget::Element(mapped)) => { + if let Some(surface) = mapped.active_window().x11_surface() { + return surface.xwm_id().unwrap() == xwm; + } } + Some(KeyboardFocusTarget::Fullscreen(surface)) => { + if let Some(surface) = surface.x11_surface() { + return surface.xwm_id().unwrap() == xwm; + } + } + _ => {} } }