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 <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-08-19 10:51:53 +02:00
parent 8425d2a6aa
commit 3b2f2efac7
+1 -3
View File
@@ -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: