Wayland: commit frame surface on resize (#635)

This commit is contained in:
trimental 2018-08-24 01:20:02 +08:00 committed by Francesca Frangipane
parent c8e339fe6d
commit 102ed3b800
2 changed files with 6 additions and 0 deletions

View file

@ -1,5 +1,7 @@
# Unreleased # Unreleased
- Fixed graphical glitches when resizing on Wayland
# Version 0.17.2 (2018-08-19) # Version 0.17.2 (2018-08-19)
- On macOS, fix `<C-Tab>` so applications receive the event. - On macOS, fix `<C-Tab>` so applications receive the event.

View file

@ -18,6 +18,7 @@ use sctk::reexports::client::{ConnectError, Display, EventQueue, GlobalEvent, Pr
use sctk::Environment; use sctk::Environment;
use sctk::reexports::client::protocol::wl_display::RequestsTrait as DisplayRequests; use sctk::reexports::client::protocol::wl_display::RequestsTrait as DisplayRequests;
use sctk::reexports::client::protocol::wl_surface::RequestsTrait;
pub struct EventsLoopSink { pub struct EventsLoopSink {
buffer: VecDeque<::Event>, buffer: VecDeque<::Event>,
@ -249,6 +250,9 @@ impl EventsLoop {
*size = (w, h); *size = (w, h);
} else if frame_refresh { } else if frame_refresh {
frame.refresh(); frame.refresh();
if !refresh {
frame.surface().commit()
}
} }
} }
if let Some(dpi) = new_dpi { if let Some(dpi) = new_dpi {