mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-20 16:43:57 +01:00
fix(borders): maximize compat w/ komorebi impl
This commit ensures that the "Komorebi" border implementation is set as the default as it has the maximum range of compat across different Windows versions, whereas the "Windows" implementation requires Win 11. Because "Windows" implementation methods will error on Windows 10, restore_all_windows has been updated to only attempt to remove accents if BorderImplementation::Windows is selected (this is gated behind the WINDOWS_11 check). re #925
This commit is contained in:
@@ -43,7 +43,7 @@ lazy_static! {
|
||||
pub static ref Z_ORDER: AtomicCell<ZOrder> = AtomicCell::new(ZOrder::Bottom);
|
||||
pub static ref STYLE: AtomicCell<BorderStyle> = AtomicCell::new(BorderStyle::System);
|
||||
pub static ref IMPLEMENTATION: AtomicCell<BorderImplementation> =
|
||||
AtomicCell::new(BorderImplementation::Windows);
|
||||
AtomicCell::new(BorderImplementation::Komorebi);
|
||||
pub static ref FOCUSED: AtomicU32 =
|
||||
AtomicU32::new(u32::from(Colour::Rgb(Rgb::new(66, 165, 245))));
|
||||
pub static ref UNFOCUSED: AtomicU32 =
|
||||
|
||||
@@ -300,7 +300,7 @@ pub struct StaticConfig {
|
||||
/// Active window border z-order (default: System)
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub border_z_order: Option<ZOrder>,
|
||||
/// Display an active window border (default: false)
|
||||
/// Active window border implementation (default: Komorebi)
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub border_implementation: Option<BorderImplementation>,
|
||||
/// Add transparency to unfocused windows (default: false)
|
||||
|
||||
@@ -26,6 +26,7 @@ use crate::core::config_generation::MatchingRule;
|
||||
use crate::core::custom_layout::CustomLayout;
|
||||
use crate::core::Arrangement;
|
||||
use crate::core::Axis;
|
||||
use crate::core::BorderImplementation;
|
||||
use crate::core::BorderStyle;
|
||||
use crate::core::CycleDirection;
|
||||
use crate::core::DefaultLayout;
|
||||
@@ -953,6 +954,7 @@ impl WindowManager {
|
||||
|
||||
let no_titlebar = NO_TITLEBAR.lock();
|
||||
let known_transparent_hwnds = transparency_manager::known_hwnds();
|
||||
let border_implementation = border_manager::IMPLEMENTATION.load();
|
||||
|
||||
for monitor in self.monitors_mut() {
|
||||
for workspace in monitor.workspaces_mut() {
|
||||
@@ -966,7 +968,9 @@ impl WindowManager {
|
||||
window.opaque()?;
|
||||
}
|
||||
|
||||
window.remove_accent()?;
|
||||
if matches!(border_implementation, BorderImplementation::Windows) {
|
||||
window.remove_accent()?;
|
||||
}
|
||||
|
||||
window.restore();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user