Skip to content

Commit

Permalink
fix(wm): increase monitor_reconciliator channel bound
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alex-ds13 authored and LGUG2Z committed Feb 21, 2025
1 parent 9c8a639 commit 60bc83d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion komorebi/src/monitor_reconciliator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static CHANNEL: OnceLock<(Sender<MonitorNotification>, Receiver<MonitorNotificat
static MONITOR_CACHE: OnceLock<Mutex<HashMap<String, Monitor>>> = OnceLock::new();

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> {
Expand Down

0 comments on commit 60bc83d

Please sign in to comment.