mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app: [Wayland] suppress spurious ConfigEvents
As reported By Larry Clapp, Wayland would send a ConfigEvent with every FrameEvent when fallback client side decorations are enabled. This is because Window would call the driver Option and Perform methods even when they're empty. The change applies to every platform, but was only observable on Wayland. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+6
-2
@@ -769,8 +769,12 @@ func (w *Window) decorate(e FrameEvent, o *op.Ops) image.Point {
|
||||
}
|
||||
// Update the window based on the actions on the decorations.
|
||||
opts, acts := splitActions(deco.Update(gtx))
|
||||
w.driver.Configure(opts)
|
||||
w.driver.Perform(acts)
|
||||
if len(opts) > 0 {
|
||||
w.driver.Configure(opts)
|
||||
}
|
||||
if acts != 0 {
|
||||
w.driver.Perform(acts)
|
||||
}
|
||||
style.Layout(gtx)
|
||||
// Offset to place the frame content below the decorations.
|
||||
decoHeight := gtx.Dp(w.decorations.Config.decoHeight)
|
||||
|
||||
Reference in New Issue
Block a user