mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
app: support changing Window options at runtime
A Window can now be requested to change its options after it has been started via its Option method. All options are supported on macOS, Windows and X11. On Wayland, only the Size and Title options can be changed at runtime. Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
@@ -211,6 +211,17 @@ func (w *Window) Invalidate() {
|
||||
}
|
||||
}
|
||||
|
||||
// Option applies the options to the window.
|
||||
func (w *Window) Option(opts ...Option) {
|
||||
go w.driverDo(func() {
|
||||
o := new(wm.Options)
|
||||
for _, opt := range opts {
|
||||
opt(o)
|
||||
}
|
||||
w.driver.Option(o)
|
||||
})
|
||||
}
|
||||
|
||||
// ReadClipboard initiates a read of the clipboard in the form
|
||||
// of a clipboard.Event. Multiple reads may be coalesced
|
||||
// to a single event.
|
||||
|
||||
Reference in New Issue
Block a user