mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-08 14:05:10 +02:00
fix(wm): increase monitor_reconciliator channel bound
When there is a monitor disconnect/reconnect, usually it produces multiple monitor events along with it, like the monitor resolution change and the work area change. With the bound set to 1 it would sometimes result in missed events. This commit increases the bound to 20 to prevent this from happening.
This commit is contained in:
@@ -48,7 +48,7 @@ static CHANNEL: OnceLock<(Sender<MonitorNotification>, Receiver<MonitorNotificat
|
|||||||
static MONITOR_CACHE: OnceLock<Mutex<HashMap<String, Monitor>>> = OnceLock::new();
|
static MONITOR_CACHE: OnceLock<Mutex<HashMap<String, Monitor>>> = OnceLock::new();
|
||||||
|
|
||||||
pub fn channel() -> &'static (Sender<MonitorNotification>, Receiver<MonitorNotification>) {
|
pub fn channel() -> &'static (Sender<MonitorNotification>, Receiver<MonitorNotification>) {
|
||||||
CHANNEL.get_or_init(|| crossbeam_channel::bounded(1))
|
CHANNEL.get_or_init(|| crossbeam_channel::bounded(20))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn event_tx() -> Sender<MonitorNotification> {
|
fn event_tx() -> Sender<MonitorNotification> {
|
||||||
|
|||||||
Reference in New Issue
Block a user