From 3b2f2efac7559ab3c4a440cdb60cf254f2d9aa89 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 19 Aug 2022 10:51:53 +0200 Subject: [PATCH] app: [Wayland] maintain fallback decoration height during maximize Window.decorations.height is supposed to be a constant during the lifetime of the window, unlike w.decorations.Config.decoHeight that varies depending on the decorations state (fallback or custom). This change makes that so, fixing a problem where the fallback decorations would fail to offset client content after a maximize or minimize. Signed-off-by: Elias Naur --- app/window.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/window.go b/app/window.go index 06b82de8..f18d71e2 100644 --- a/app/window.go +++ b/app/window.go @@ -180,6 +180,7 @@ func NewWindow(options ...Option) *Window { w.decorations.Theme = theme w.decorations.Decorations = deco w.decorations.enabled = cnf.Decorated + w.decorations.height = decoHeight w.imeState.compose = key.Range{Start: -1, End: -1} w.semantic.ids = make(map[router.SemanticID]router.SemanticNode) w.callbacks.w = w @@ -906,9 +907,6 @@ func (w *Window) processEvent(d driver, e event.Event) bool { w.waitAck(d) case ConfigEvent: w.decorations.Config = e2.Config - if !w.fallbackDecorate() { - w.decorations.height = 0 - } e2.Config = w.effectiveConfig() w.out <- e2 case event.Event: