fix(wm): forcibly disable transparency on un/stack-all

This commit is contained in:
LGUG2Z
2025-10-30 16:12:00 -07:00
parent 18ee667896
commit 7a6905b9e8
2 changed files with 11 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ use crate::WindowsApi;
use crate::should_act;
pub static TRANSPARENCY_ENABLED: AtomicBool = AtomicBool::new(false);
pub static TRANSPARENCY_ENABLED_OVERRIDE: AtomicBool = AtomicBool::new(false);
pub static TRANSPARENCY_ALPHA: AtomicU8 = AtomicU8::new(200);
static KNOWN_HWNDS: OnceLock<Mutex<Vec<isize>>> = OnceLock::new();

View File

@@ -2682,6 +2682,11 @@ impl WindowManager {
#[tracing::instrument(skip(self))]
pub fn stack_all(&mut self) -> eyre::Result<()> {
if transparency_manager::TRANSPARENCY_ENABLED.load(Ordering::SeqCst) {
transparency_manager::TRANSPARENCY_ENABLED.store(false, Ordering::SeqCst);
transparency_manager::TRANSPARENCY_ENABLED_OVERRIDE.store(true, Ordering::SeqCst);
}
self.handle_unmanaged_window_behaviour()?;
tracing::info!("stacking all windows on workspace");
@@ -2749,6 +2754,11 @@ impl WindowManager {
workspace.focus_container_by_window(hwnd)?;
}
if transparency_manager::TRANSPARENCY_ENABLED_OVERRIDE.load(Ordering::SeqCst) {
transparency_manager::TRANSPARENCY_ENABLED.store(true, Ordering::SeqCst);
transparency_manager::TRANSPARENCY_ENABLED_OVERRIDE.store(false, Ordering::SeqCst);
}
if update_workspace {
self.update_focused_workspace(self.mouse_follows_focus, true)?;
}