mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-10 23:22:43 +02:00
fix(bar): check monitor connection on all notifications
This commit is contained in:
@@ -673,10 +673,6 @@ impl eframe::App for Komobar {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Ok(KomorebiEvent::Notification(notification)) => {
|
Ok(KomorebiEvent::Notification(notification)) => {
|
||||||
let should_apply_config = if matches!(
|
|
||||||
notification.event,
|
|
||||||
NotificationEvent::Monitor(MonitorNotification::DisplayConnectionChange)
|
|
||||||
) {
|
|
||||||
let state = ¬ification.state;
|
let state = ¬ification.state;
|
||||||
let usr_monitor_index = match &self.config.monitor {
|
let usr_monitor_index = match &self.config.monitor {
|
||||||
MonitorConfigOrIndex::MonitorConfig(monitor_config) => monitor_config.index,
|
MonitorConfigOrIndex::MonitorConfig(monitor_config) => monitor_config.index,
|
||||||
@@ -717,6 +713,10 @@ impl eframe::App for Komobar {
|
|||||||
self.disabled = false;
|
self.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let should_apply_config = if matches!(
|
||||||
|
notification.event,
|
||||||
|
NotificationEvent::Monitor(MonitorNotification::DisplayConnectionChange)
|
||||||
|
) {
|
||||||
// Store the monitor coordinates in case they've changed
|
// Store the monitor coordinates in case they've changed
|
||||||
MONITOR_RIGHT.store(
|
MONITOR_RIGHT.store(
|
||||||
state.monitors.elements()[self.monitor_index].size().right,
|
state.monitors.elements()[self.monitor_index].size().right,
|
||||||
|
|||||||
Reference in New Issue
Block a user