From 2e91edafbbb2244ee42810dd6e6ac665e0f1ee19 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 22 Feb 2022 17:08:13 +0100 Subject: [PATCH] app: [Wayland] always refresh frame pacing notification Apparently, a Wayland server such as Sway and River may not issue a frame pacing callback created before a top level configure event. This change ensures the frame pacing callback is always refreshed when animating, regardless of the reason for the frame. Fixes: https://todo.sr.ht/~eliasnaur/gio/364 Signed-off-by: Elias Naur --- app/os_wayland.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/os_wayland.go b/app/os_wayland.go index 39213ad4..880a94cd 100644 --- a/app/os_wayland.go +++ b/app/os_wayland.go @@ -1609,11 +1609,11 @@ func (w *window) draw() { w.w.Event(ConfigEvent{Config: w.config}) } anim := w.animating || w.fling.anim.Active() - // Draw animation only when not waiting for frame callback. - anim = anim && w.lastFrameCallback == nil sync := w.redraw w.redraw = false - if !anim && !sync { + // Draw animation only when not waiting for frame callback. + redrawAnim := anim && w.lastFrameCallback == nil + if !redrawAnim && !sync { return } if anim {