emoon / rust_minifb

Cross platfrom window and framebuffer crate for Rust
MIT License
1.01k stars 97 forks source link

Incorrect size of non-decorated windows on Windows #245

Closed swismer closed 3 years ago

swismer commented 3 years ago

When creating a non-decorated window on Windows, the size of the window is too large, because the calculation always assumes decoration. This issue is not obvious as the oversize area seems to be transparent. Clicking on it reveals the issue. I tracked it down to Window.open_window(): https://github.com/emoon/rust_minifb/blob/e5b5cc50d581494c38612c7dd835609d18e08eff/src/os/windows/mod.rs#L510-L514 Here different window flags are used to determine the size compared to when creating the window (line 552). According to https://stackoverflow.com/a/25879124 the same flags should be used for both WinAPI calls.

emoon commented 3 years ago

Fixed by https://github.com/emoon/rust_minifb/pull/246