widget: [API] change Decorations to leave the user in control of window state

As suggested by ~egonelbre, Decorations should not be the source of truth
for the windows state, because external gestures may also change state.

This breaking change removes Decorations.Perform and exposes Maximized
as a bool which is the user's responsibility to set.

Fixes: https://todo.sr.ht/~eliasnaur/gio/600
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2024-07-31 18:39:30 +02:00
parent 97044e53b5
commit 6722c7960a
3 changed files with 8 additions and 25 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ func (d DecorationsStyle) layoutDecorations(gtx layout.Context) layout.Dimension
case system.ActionMinimize:
w = minimizeWindow
case system.ActionMaximize:
if d.Decorations.Maximized() {
if d.Decorations.Maximized {
w = maximizedWindow
} else {
w = maximizeWindow