mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-05-07 11:23:33 +02:00
fix(wm): dynamically reserve monitor ring space
This commit makes a small change to dynamically keep reserving space in the VecDeque that backs Ring<Monitor> until an index preference can be contained within the current length.
This commit is contained in:
@@ -277,7 +277,7 @@ impl WindowsApi {
|
||||
monitors.elements_mut().push_back(m);
|
||||
} else if let Some(preference) = index_preference {
|
||||
let current_len = monitors.elements().len();
|
||||
if *preference > current_len {
|
||||
while *preference > current_len {
|
||||
monitors.elements_mut().reserve(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user