mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
app/internal/wm: remove superfluous main thread switching
The affected code paths are guaranteed to be run on the main thread by the app.Window callers. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -220,17 +220,13 @@ func windowSetCursor(from, to pointer.CursorName) pointer.CursorName {
|
|||||||
case pointer.CursorGrab:
|
case pointer.CursorGrab:
|
||||||
curID = 7
|
curID = 7
|
||||||
case pointer.CursorNone:
|
case pointer.CursorNone:
|
||||||
runOnMain(func() {
|
|
||||||
C.gio_hideCursor()
|
C.gio_hideCursor()
|
||||||
})
|
|
||||||
return to
|
return to
|
||||||
}
|
}
|
||||||
runOnMain(func() {
|
|
||||||
if from == pointer.CursorNone {
|
if from == pointer.CursorNone {
|
||||||
C.gio_showCursor()
|
C.gio_showCursor()
|
||||||
}
|
}
|
||||||
C.gio_setCursor(C.NSUInteger(curID))
|
C.gio_setCursor(C.NSUInteger(curID))
|
||||||
})
|
|
||||||
return to
|
return to
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user