Stabilize popup focus opacity

This commit is contained in:
2026-09-12 13:57:45 +02:00
parent 5f482a2865
commit 7fb3347bb0
2 changed files with 9 additions and 3 deletions

View File

@@ -62,9 +62,10 @@ Each bounded iteration must:
- [ ] Make popup close hide the window while the background process continues (code path added; desktop verification pending).
- [ ] Center the popup on the configured/active monitor.
- [x] Keep the X11 popup above other windows and apply 30% opacity while it is
inactive, returning to full opacity when focused (27 X11-feature tests and
Docker GTK/X11/package build, 2026-09-12); compositor behavior remains live
desktop evidence.
inactive, returning to full opacity when focused; recheck after mapping and
every 100 ms to cover Cinnamon/GTK4 focus-notification races (27 X11-feature
tests and Docker GTK/X11/package build, 2026-09-12); compositor behavior
remains live desktop evidence.
- [x] Preserve search query and surviving selection after refresh-triggering actions (17 core tests and Docker GTK/X11 build, 2026-09-10).
- [ ] Keep keyboard pause state synchronized with button and status text.
- [ ] Implement complete keyboard-first navigation and commands.

View File

@@ -182,6 +182,11 @@ fn build_window(
window.connect_is_active_notify(move |_| {
crate::platform::linux::x11_window::set_active_opacity(&window_for_opacity);
});
let window_for_opacity = window.clone();
glib::timeout_add_local(std::time::Duration::from_millis(100), move || {
crate::platform::linux::x11_window::set_active_opacity(&window_for_opacity);
glib::ControlFlow::Continue
});
window.set_title(Some(&format!("Cliphoard — {}", config.global_shortcut)));
pause_button.set_tooltip_text(Some("Pause/resume recording: Ctrl+Alt+R"));
let window_for_close = window.clone();