mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 01:58:51 +02:00
fix(transparency): handle multi-monitor monocles
This commit ensures that transparency will be set accordingly when focus moves to and from monocle containers on multi-monitor setups.
This commit is contained in:
@@ -104,9 +104,20 @@ pub fn handle_notifications(wm: Arc<Mutex<WindowManager>>) -> color_eyre::Result
|
|||||||
// Monocle container is never transparent
|
// Monocle container is never transparent
|
||||||
if let Some(monocle) = ws.monocle_container() {
|
if let Some(monocle) = ws.monocle_container() {
|
||||||
if let Some(window) = monocle.focused_window() {
|
if let Some(window) = monocle.focused_window() {
|
||||||
if let Err(error) = window.opaque() {
|
if monitor_idx == focused_monitor_idx {
|
||||||
let hwnd = window.hwnd;
|
if let Err(error) = window.opaque() {
|
||||||
tracing::error!("failed to make monocle window {hwnd} opaque: {error}")
|
let hwnd = window.hwnd;
|
||||||
|
tracing::error!(
|
||||||
|
"failed to make monocle window {hwnd} opaque: {error}"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let Err(error) = window.transparent() {
|
||||||
|
let hwnd = window.hwnd;
|
||||||
|
tracing::error!(
|
||||||
|
"failed to make monocle window {hwnd} transparent: {error}"
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user