app: guarantee a ConfigEvent for every Window.Configure call

Not only is the client guaranteed a ConfigEvent, but app.Window
can assume that an unsupported decoration change will be corrected
(by a ConfigEvent with Decorated forced to the supported value).

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-06-25 13:57:46 +02:00
parent c5e07ba01f
commit 69e4a3cff3
8 changed files with 10 additions and 36 deletions
+1 -3
View File
@@ -281,9 +281,7 @@ func (w *window) Configure([]Option) {
prev := w.config
// Decorations are never disabled.
w.config.Decorated = true
if w.config != prev {
w.w.Event(ConfigEvent{Config: w.config})
}
w.w.Event(ConfigEvent{Config: w.config})
}
func (w *window) EditorStateChanged(old, new editorState) {}