feat: gray out paste menu when clipboard is empty or location unsupported

This commit is contained in:
Frederic Laing 2026-02-11 18:21:06 +01:00 committed by Jacob Kauffmann
parent f9d4ca4867
commit 591ba0f9b9
5 changed files with 173 additions and 20 deletions

View file

@ -325,3 +325,14 @@ impl TryFrom<(Vec<u8>, String)> for ClipboardPasteText {
})
}
}
/// Cached clipboard content for paste operations.
/// This is needed because Wayland restricts clipboard access from popup windows.
#[derive(Clone, Debug)]
pub enum ClipboardCache {
Files(ClipboardPaste),
Image(ClipboardPasteImage),
Video(ClipboardPasteVideo),
Text(ClipboardPasteText),
Empty,
}