Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around crash when opening window #1849

Merged
merged 1 commit into from
May 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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