forked from joejulian/gio
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:
+3
-3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user