mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-16 10:02:41 +02:00
fix(borders): gate windows impl behind win11 check
This commit is contained in:
@@ -72,6 +72,7 @@ use crate::SUBSCRIPTION_PIPES;
|
|||||||
use crate::SUBSCRIPTION_SOCKETS;
|
use crate::SUBSCRIPTION_SOCKETS;
|
||||||
use crate::TCP_CONNECTIONS;
|
use crate::TCP_CONNECTIONS;
|
||||||
use crate::TRAY_AND_MULTI_WINDOW_IDENTIFIERS;
|
use crate::TRAY_AND_MULTI_WINDOW_IDENTIFIERS;
|
||||||
|
use crate::WINDOWS_11;
|
||||||
use crate::WORKSPACE_RULES;
|
use crate::WORKSPACE_RULES;
|
||||||
use stackbar_manager::STACKBAR_FOCUSED_TEXT_COLOUR;
|
use stackbar_manager::STACKBAR_FOCUSED_TEXT_COLOUR;
|
||||||
use stackbar_manager::STACKBAR_LABEL;
|
use stackbar_manager::STACKBAR_LABEL;
|
||||||
@@ -1244,6 +1245,11 @@ impl WindowManager {
|
|||||||
border_manager::BORDER_ENABLED.store(enable, Ordering::SeqCst);
|
border_manager::BORDER_ENABLED.store(enable, Ordering::SeqCst);
|
||||||
}
|
}
|
||||||
SocketMessage::BorderImplementation(implementation) => {
|
SocketMessage::BorderImplementation(implementation) => {
|
||||||
|
if !*WINDOWS_11 && matches!(implementation, BorderImplementation::Windows) {
|
||||||
|
tracing::error!(
|
||||||
|
"BorderImplementation::Windows is only supported on Windows 11 and above"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
IMPLEMENTATION.store(implementation);
|
IMPLEMENTATION.store(implementation);
|
||||||
match IMPLEMENTATION.load() {
|
match IMPLEMENTATION.load() {
|
||||||
BorderImplementation::Komorebi => {
|
BorderImplementation::Komorebi => {
|
||||||
@@ -1256,6 +1262,7 @@ impl WindowManager {
|
|||||||
|
|
||||||
border_manager::send_notification();
|
border_manager::send_notification();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
SocketMessage::BorderColour(kind, r, g, b) => match kind {
|
SocketMessage::BorderColour(kind, r, g, b) => match kind {
|
||||||
WindowKind::Single => {
|
WindowKind::Single => {
|
||||||
border_manager::FOCUSED.store(Rgb::new(r, g, b).into(), Ordering::SeqCst);
|
border_manager::FOCUSED.store(Rgb::new(r, g, b).into(), Ordering::SeqCst);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ use crate::MONITOR_INDEX_PREFERENCES;
|
|||||||
use crate::OBJECT_NAME_CHANGE_ON_LAUNCH;
|
use crate::OBJECT_NAME_CHANGE_ON_LAUNCH;
|
||||||
use crate::REGEX_IDENTIFIERS;
|
use crate::REGEX_IDENTIFIERS;
|
||||||
use crate::TRAY_AND_MULTI_WINDOW_IDENTIFIERS;
|
use crate::TRAY_AND_MULTI_WINDOW_IDENTIFIERS;
|
||||||
|
use crate::WINDOWS_11;
|
||||||
use crate::WORKSPACE_RULES;
|
use crate::WORKSPACE_RULES;
|
||||||
use komorebi_core::BorderImplementation;
|
use komorebi_core::BorderImplementation;
|
||||||
use komorebi_core::StackbarLabel;
|
use komorebi_core::StackbarLabel;
|
||||||
@@ -596,6 +597,17 @@ impl StaticConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
STYLE.store(self.border_style.unwrap_or_default());
|
STYLE.store(self.border_style.unwrap_or_default());
|
||||||
|
|
||||||
|
if !*WINDOWS_11
|
||||||
|
&& matches!(
|
||||||
|
self.border_implementation.unwrap_or_default(),
|
||||||
|
BorderImplementation::Windows
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tracing::error!(
|
||||||
|
"BorderImplementation::Windows is only supported on Windows 11 and above"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
IMPLEMENTATION.store(self.border_implementation.unwrap_or_default());
|
IMPLEMENTATION.store(self.border_implementation.unwrap_or_default());
|
||||||
match IMPLEMENTATION.load() {
|
match IMPLEMENTATION.load() {
|
||||||
BorderImplementation::Komorebi => {
|
BorderImplementation::Komorebi => {
|
||||||
@@ -607,6 +619,7 @@ impl StaticConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
border_manager::send_notification();
|
border_manager::send_notification();
|
||||||
|
}
|
||||||
|
|
||||||
transparency_manager::TRANSPARENCY_ENABLED
|
transparency_manager::TRANSPARENCY_ENABLED
|
||||||
.store(self.transparency.unwrap_or(false), Ordering::SeqCst);
|
.store(self.transparency.unwrap_or(false), Ordering::SeqCst);
|
||||||
|
|||||||
Reference in New Issue
Block a user