Originally created by @ferenyl on GitHub (Aug 27, 2024).
Describe the bug
When display_index_preferences is present in config, start fails.
komorebi.exe stops without output
When i run komorebi from source:
2024-08-27T13:29:30.102350Z INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0
2024-08-27T13:29:30.104526Z INFO komorebi: creating window manager from static configuration file: C:\Users\USR\.config\komorebi\komorebi.json
2024-08-27T13:29:30.105446Z INFO komorebi::border_manager: purging known borders: []
2024-08-27T13:29:30.114724Z INFO init: komorebi::window_manager: initialising
To Reproduce
Steps to reproduce the behavior:
add display_index_preferences with three monitors
start komorebi with komorebic start -whkd
Expected behavior
komorebi should start
Operating System
OS Name: Microsoft Windows 11 Home
OS Version: 10.0.22631 N/A Build 22631
komorebic check Output
KOMOREBI_CONFIG_HOME detected: C:\Users\USR\.config\komorebi
Looking for configuration files in C:\Users\USR\.config\komorebi
Found komorebi.json; this file can be passed to the start command with the --config flag
Found C:\Users\USR\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag
@ferenyl commented on GitHub (Aug 27, 2024):
After some debugging i found that i got stuck on this: https://github.com/LGUG2Z/komorebi/blob/b799fd30774b5ae9289481a33f735af8c6047650/komorebi/src/windows_api.rs#L290
Are you able to add some debug lines in that block to see what the values of preference and len are in there? There must be a subtle logic bug here but I can't figure it out from looking at it
@LGUG2Z commented on GitHub (Aug 27, 2024):
Are you able to add some debug lines in that block to see what the values of preference and len are in there? There must be a subtle logic bug here but I can't figure it out from looking at it
This might fix it; I have a feeling that reserve doesn't actually grow the Vec len 🤔
@LGUG2Z commented on GitHub (Aug 27, 2024):
https://github.com/LGUG2Z/komorebi/commit/3101e089b3feef04c30df735b76a530ed40ae967
This might fix it; I have a feeling that `reserve` doesn't actually grow the Vec len 🤔
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ferenyl on GitHub (Aug 27, 2024).
Describe the bug
When display_index_preferences is present in config, start fails.
komorebi.exe stops without output
When i run komorebi from source:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
komorebi should start
Operating System
OS Name: Microsoft Windows 11 Home
OS Version: 10.0.22631 N/A Build 22631
komorebic checkOutput@ferenyl commented on GitHub (Aug 27, 2024):
After some debugging i found that i got stuck on this: https://github.com/LGUG2Z/komorebi/blob/b799fd30774b5ae9289481a33f735af8c6047650/komorebi/src/windows_api.rs#L290
@LGUG2Z commented on GitHub (Aug 27, 2024):
Are you able to add some debug lines in that block to see what the values of preference and len are in there? There must be a subtle logic bug here but I can't figure it out from looking at it
@LGUG2Z commented on GitHub (Aug 27, 2024):
https://github.com/LGUG2Z/komorebi/commit/3101e089b3feef04c30df735b76a530ed40ae967
This might fix it; I have a feeling that
reservedoesn't actually grow the Vec len 🤔@ferenyl commented on GitHub (Aug 27, 2024):
Can confirm that reserve doesn't grow the Vec len. Going to test the commit now.
@ferenyl commented on GitHub (Aug 27, 2024):
That code works! going to build from source and run from that.
@LGUG2Z commented on GitHub (Aug 27, 2024):
Excellent, I'll merge the fix to master when I get back from the office tonight 🎉
@LGUG2Z commented on GitHub (Aug 28, 2024):
This is now on master and will be part of the next nightly release on Saturday 🚀