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 <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-02-22 17:08:13 +01:00
parent 773a7e48a0
commit 2e91edafbb
+3 -3
View File
@@ -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 {