From 102ed3b800b009acf2e925c98d03c1a3790e0122 Mon Sep 17 00:00:00 2001 From: trimental Date: Fri, 24 Aug 2018 01:20:02 +0800 Subject: [PATCH] Wayland: commit frame surface on resize (#635) --- CHANGELOG.md | 2 ++ src/platform/linux/wayland/event_loop.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a82448c2..411ba3ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +- Fixed graphical glitches when resizing on Wayland + # Version 0.17.2 (2018-08-19) - On macOS, fix `` so applications receive the event. diff --git a/src/platform/linux/wayland/event_loop.rs b/src/platform/linux/wayland/event_loop.rs index cf6b7b2a..0639044e 100644 --- a/src/platform/linux/wayland/event_loop.rs +++ b/src/platform/linux/wayland/event_loop.rs @@ -18,6 +18,7 @@ use sctk::reexports::client::{ConnectError, Display, EventQueue, GlobalEvent, Pr use sctk::Environment; use sctk::reexports::client::protocol::wl_display::RequestsTrait as DisplayRequests; +use sctk::reexports::client::protocol::wl_surface::RequestsTrait; pub struct EventsLoopSink { buffer: VecDeque<::Event>, @@ -249,6 +250,9 @@ impl EventsLoop { *size = (w, h); } else if frame_refresh { frame.refresh(); + if !refresh { + frame.surface().commit() + } } } if let Some(dpi) = new_dpi {