From 3d8c94bae540c214ab345a226172c181533da4c4 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Sun, 8 Oct 2017 15:51:48 +0200 Subject: [PATCH] wayland: commit the empty surface at init (#309) This should trigger the compositor's mechanism for sending a configure event, which should most of the time be processed before any winit user actually tries to draw. --- src/platform/linux/wayland/window.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platform/linux/wayland/window.rs b/src/platform/linux/wayland/window.rs index d57dfec3..8a7eb113 100644 --- a/src/platform/linux/wayland/window.rs +++ b/src/platform/linux/wayland/window.rs @@ -76,6 +76,10 @@ impl Window { decorated_id }; + // send our configuration to the compositor + // if we're in xdg mode, no buffer is attached yet, so this + // is fine (and more or less required actually) + surface.commit(); let me = Window { ctxt: ctxt, cleanup_signal: cleanup_signal,