mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
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:
+4
-4
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user