Window Always Starts Maximised on Ubuntu 22.04
Closed this issue · 4 comments
Also, is there some way to prevent the window from being resizeable?
I found the issue, There's a line in raylib.bqn that uses rayffi.SetConfigFlags
, which i assumed to be equivalent to rayffi.SetWindowState
but would be used before window was opened, but this is wrong. what's different between the two is that SetConfigFlags
clears all other window flags (listed in constants.bqn in the windowConfigFlags namespace). I don't know why this didn't affect the windows version, I'll look into that before i commit anything.
Thanks for the issue :)
Oh, nevermind, the default of all config values is 0, meaning the thing i said about "clears all the flags" doesn't actually affect anything since it doesn't overwrite anything important. what's actually the issue is that Linux by default has window-scalable be allowed by default, but windows-OS's windows doesn't (i assume, since i had this line for the windows version specifically). This theory needs to be tested though.
I may need to implement my own version of SetFlags, i think that would make this a lot easier. Another issue here is also due to this i think #11
Also, is there some way to prevent the window from being resizeable?
Yes, first is removing the line rayffi.SetConfigFlags windowConfigFlags.window_resizable
in raylib.bqn, (i will be removing this line in a new update myself aswell)
second step is doing rayffi.ClearWindowState window.configFlags.window_resizable
while having the window open
In the latest commit, I added state management functions so now to make window non-resizable you do window.SetResizable 0