mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
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:
+1
-6
@@ -861,16 +861,11 @@ func (w *Window) processEvent(d driver, e event.Event) bool {
|
||||
case wakeupEvent:
|
||||
select {
|
||||
case opts := <-w.options:
|
||||
// Send a decoration mode update, in case the driver does not
|
||||
// support switching.
|
||||
cnf := Config{Decorated: w.decorations.enabled}
|
||||
for _, opt := range opts {
|
||||
opt(w.metric, &cnf)
|
||||
}
|
||||
if w.decorations.enabled != cnf.Decorated {
|
||||
w.decorations.enabled = cnf.Decorated
|
||||
w.out <- ConfigEvent{Config: w.effectiveConfig()}
|
||||
}
|
||||
w.decorations.enabled = cnf.Decorated
|
||||
d.Configure(opts)
|
||||
default:
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user