app/internal/window: (Windows) don't send zero-sized draw requests

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-29 16:15:55 +01:00
parent 3738aa43a8
commit bd7c7a108a
+3
View File
@@ -332,6 +332,9 @@ func (w *window) draw(sync bool) {
windows.GetClientRect(w.hwnd, &r)
w.width = int(r.Right - r.Left)
w.height = int(r.Bottom - r.Top)
if w.width == 0 || w.height == 0 {
return
}
cfg := configForDC()
cfg.now = time.Now()
w.w.Event(FrameEvent{