wayland: Initially paint the window white so that they always exist#188
wayland: Initially paint the window white so that they always exist#188tomaka merged 1 commit intorust-windowing:masterfrom
Conversation
|
Awesome, I just tested the window example locally (on gnome) and can confirm that this does indeed draw a white window, allowing the window to receive events without issues. The window did however look slightly strange. Only the top and left borders were shown - the bottom and right were not: The example happens to work fine in Other than this, LGTM |
|
Actually, I don't think this is a mutter bug, but rather a resizing event poorly handled. All other windowing mechanism than wayland have some way for a window to explicitly set its size (some kind of Wayland do not have that, rather the size of a window is implicitly defined by the size of whatever you put inside. As we also draw the decoration manually, this seems like a case where the size of the content and the size of the decorations got out-of-sync. Whenever winit resizes itself after a demand of the display server, it generates a This should not be an issue with glutin, as it automatically resizes the EGL surface appropriately. So if my interpretation is correct, the glutin examples using winit including this patch should not exhibit the issue. Could you confirm it? |
|
Ah yes you are correct, I just tested the glutin window example locally and can confirm that it does indeed behave correctly with this patch 👍 |
|
Thanks |
Includes: - Recent removal of sync (breaking change) rust-windowing#191. - Wayland fixes: rust-windowing#190, rust-windowing#188, rust-windowing#181 - X11 fixes: rust-windowing#174, rust-windowing#178,
…or-luminos-0.96 Fix the magicleap app to work in LuminOS 0.96

This adds a dependency on the tempfile crate, but this was already a transitive dependency via wayland-window.
This PR uses the basic mechanism of wayland for passing memory buffers to paint the window content white once at creation, to ensure the window actually exists and can receive events, to avoid the issues like rust-windowing/glutin#884
This mechanism is guaranteed to always be available by the wayland spec, and does not pose any problem to initialize an EGL or Vulkan context afterwards.
closes #109