From 3bd4001cc311b97a09bca34e6f60cfa66a4430b7 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Thu, 4 Jul 2019 22:03:29 +0200 Subject: [PATCH] Fixed mouse cursor bug. If the Run loop was non-blocking (wait set to false) the cursor was reset back to the default. --- ui/allg5ui/renderer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/allg5ui/renderer.go b/ui/allg5ui/renderer.go index fd4fcfc..d162987 100644 --- a/ui/allg5ui/renderer.go +++ b/ui/allg5ui/renderer.go @@ -54,7 +54,10 @@ func (r *Renderer) PushEvents(t ui.EventTarget, wait bool) { r.newCursor = ui.MouseCursorDefault var ev = eventWait(r.eq, wait) - for nil != ev { + if ev == nil { + return + } + for ev != nil { switch e := ev.(type) { case *allg5.DisplayCloseEvent: t.Handle(&ui.DisplayCloseEvent{EventBase: eventBase(e)})