Skip to content

Commit

Permalink
Merge pull request #1849 from hannobraun/crash
Browse files Browse the repository at this point in the history
Work around crash when opening window
  • Loading branch information
hannobraun authored May 30, 2023
2 parents c458c71 + 0f572d0 commit d74949b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion crates/fj-window/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,26 @@ impl Window {
let window = WindowBuilder::new()
.with_title("Fornjot")
.with_maximized(true)
.with_decorations(true)
// When the window decorations are enabled, I'm seeing the following
// error on Gnome/Wayland, in response to a `ScaleFactorChange`
// event:
// ```
// wl_surface@24: error 2: Buffer size (1940x45) must be an integer multiple of the buffer_scale (2).
// ```
//
// This is happening most of the time. Very rarely, the window will
// open as expected.
//
// I believe that there is a race condition somewhere low in the
// stack, that will cause the buffer size for the window decorations
// to not be updated before the check that produces the above error.
// I failed to track down where this is happening, so I decided to
// deploy this workaround instead of spending more time.
//
// Window decorations should be re-enabled once possible. This is
// being tracked in this issue:
// https://github.com/hannobraun/fornjot/issues/1848
.with_decorations(false)
.with_transparent(false)
.build(event_loop)?;

Expand Down

0 comments on commit d74949b

Please sign in to comment.