app: don't call Window.driverDefer for cursor updates

Like d951d07c93, calls to Window.updateCursor happens on the
evennt loop thread, and so must not go through Window.driverDefer.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-01-13 19:45:18 +01:00
parent d951d07c93
commit 23bd7aa1d4
+4 -4
View File
@@ -616,7 +616,7 @@ func (w *Window) processEvent(d driver, e event.Event) {
break break
} }
w.processFrame(d, frameStart) w.processFrame(d, frameStart)
w.updateCursor() w.updateCursor(d)
case *system.CommandEvent: case *system.CommandEvent:
w.out <- e w.out <- e
w.waitAck(d) w.waitAck(d)
@@ -634,7 +634,7 @@ func (w *Window) processEvent(d driver, e event.Event) {
w.setNextFrame(time.Time{}) w.setNextFrame(time.Time{})
w.updateAnimation(d) w.updateAnimation(d)
} }
w.updateCursor() w.updateCursor(d)
w.out <- e w.out <- e
} }
} }
@@ -680,10 +680,10 @@ func (w *Window) run(options []Option) {
} }
} }
func (w *Window) updateCursor() { func (w *Window) updateCursor(d driver) {
if c := w.queue.q.Cursor(); c != w.cursor { if c := w.queue.q.Cursor(); c != w.cursor {
w.cursor = c w.cursor = c
w.SetCursorName(c) d.SetCursor(c)
} }
} }