mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
app: [Windows] always send ConfigEvent after Configure
This case was missed in 69e4a3cff3.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-5
@@ -628,7 +628,6 @@ func (w *window) readClipboard() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *window) Configure(options []Option) {
|
func (w *window) Configure(options []Option) {
|
||||||
oldConfig := w.config
|
|
||||||
dpi := windows.GetSystemDPI()
|
dpi := windows.GetSystemDPI()
|
||||||
metric := configForDPI(dpi)
|
metric := configForDPI(dpi)
|
||||||
w.config.apply(metric, options)
|
w.config.apply(metric, options)
|
||||||
@@ -689,10 +688,7 @@ func (w *window) Configure(options []Option) {
|
|||||||
windows.SetWindowPos(w.hwnd, 0, x, y, width, height, swpStyle)
|
windows.SetWindowPos(w.hwnd, 0, x, y, width, height, swpStyle)
|
||||||
windows.ShowWindow(w.hwnd, showMode)
|
windows.ShowWindow(w.hwnd, showMode)
|
||||||
|
|
||||||
// A config event is sent to the main event loop whenever the configuration is changed
|
w.w.Event(ConfigEvent{Config: w.config})
|
||||||
if oldConfig != w.config {
|
|
||||||
w.w.Event(ConfigEvent{Config: w.config})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *window) WriteClipboard(s string) {
|
func (w *window) WriteClipboard(s string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user