~eliasnaur/gio

3b2f2efac7559ab3c4a440cdb60cf254f2d9aa89 — Elias Naur 9 months ago 8425d2a
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>
1 files changed, 1 insertions(+), 3 deletions(-)

M app/window.go
M app/window.go => app/window.go +1 -3
@@ 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: