mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
app: [Windows] don't redraw zero-sized windows
Fixes gio#270 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-3
@@ -432,13 +432,13 @@ func (w *window) draw(sync bool) {
|
|||||||
X: int(r.Right - r.Left),
|
X: int(r.Right - r.Left),
|
||||||
Y: int(r.Bottom - r.Top),
|
Y: int(r.Bottom - r.Top),
|
||||||
}
|
}
|
||||||
if w.config.Size.X == 0 || w.config.Size.Y == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if size != w.config.Size {
|
if size != w.config.Size {
|
||||||
w.config.Size = size
|
w.config.Size = size
|
||||||
w.w.Event(ConfigEvent{Config: w.config})
|
w.w.Event(ConfigEvent{Config: w.config})
|
||||||
}
|
}
|
||||||
|
if w.config.Size.X == 0 || w.config.Size.Y == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
dpi := windows.GetWindowDPI(w.hwnd)
|
dpi := windows.GetWindowDPI(w.hwnd)
|
||||||
cfg := configForDPI(dpi)
|
cfg := configForDPI(dpi)
|
||||||
w.w.Event(frameEvent{
|
w.w.Event(frameEvent{
|
||||||
|
|||||||
Reference in New Issue
Block a user