mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 17:48:34 +02:00
fix(wm): forcibly disable transparency on un/stack-all
This commit is contained in:
@@ -17,6 +17,7 @@ use crate::WindowsApi;
|
|||||||
use crate::should_act;
|
use crate::should_act;
|
||||||
|
|
||||||
pub static TRANSPARENCY_ENABLED: AtomicBool = AtomicBool::new(false);
|
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);
|
pub static TRANSPARENCY_ALPHA: AtomicU8 = AtomicU8::new(200);
|
||||||
|
|
||||||
static KNOWN_HWNDS: OnceLock<Mutex<Vec<isize>>> = OnceLock::new();
|
static KNOWN_HWNDS: OnceLock<Mutex<Vec<isize>>> = OnceLock::new();
|
||||||
|
|||||||
@@ -2682,6 +2682,11 @@ impl WindowManager {
|
|||||||
|
|
||||||
#[tracing::instrument(skip(self))]
|
#[tracing::instrument(skip(self))]
|
||||||
pub fn stack_all(&mut self) -> eyre::Result<()> {
|
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()?;
|
self.handle_unmanaged_window_behaviour()?;
|
||||||
tracing::info!("stacking all windows on workspace");
|
tracing::info!("stacking all windows on workspace");
|
||||||
|
|
||||||
@@ -2749,6 +2754,11 @@ impl WindowManager {
|
|||||||
workspace.focus_container_by_window(hwnd)?;
|
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 {
|
if update_workspace {
|
||||||
self.update_focused_workspace(self.mouse_follows_focus, true)?;
|
self.update_focused_workspace(self.mouse_follows_focus, true)?;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user