From 8137aa350c2165d9824acb79d453150f18a3ebc6 Mon Sep 17 00:00:00 2001 From: Ellie High <6687206+wizzeh@users.noreply.github.com> Date: Tue, 24 Mar 2026 05:59:16 -0700 Subject: [PATCH] Allow fallback from smithay to arboard when getting clipboard (#7976) * [X] I have followed the instructions in the PR template Quick fix -- when the arboard and smithay features are both enabled, Clipboard::get returns early if it can't find a smithay clipboard. This PR just allows fallback to arboard instead of early-returning. --------- Co-authored-by: Emil Ernerfeldt --- crates/egui-winit/src/clipboard.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/egui-winit/src/clipboard.rs b/crates/egui-winit/src/clipboard.rs index 75d0469ec..2410c3ee6 100644 --- a/crates/egui-winit/src/clipboard.rs +++ b/crates/egui-winit/src/clipboard.rs @@ -65,13 +65,12 @@ impl Clipboard { feature = "smithay-clipboard" ))] if let Some(clipboard) = &mut self.smithay { - return match clipboard.load() { - Ok(text) => Some(text), + match clipboard.load() { + Ok(text) => return Some(text), Err(err) => { log::error!("smithay paste error: {err}"); - None } - }; + } } #[cfg(all(