forked from joejulian/gio
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:
|
||||
curID = 7
|
||||
case pointer.CursorNone:
|
||||
runOnMain(func() {
|
||||
C.gio_hideCursor()
|
||||
})
|
||||
C.gio_hideCursor()
|
||||
return to
|
||||
}
|
||||
runOnMain(func() {
|
||||
if from == pointer.CursorNone {
|
||||
C.gio_showCursor()
|
||||
}
|
||||
C.gio_setCursor(C.NSUInteger(curID))
|
||||
})
|
||||
if from == pointer.CursorNone {
|
||||
C.gio_showCursor()
|
||||
}
|
||||
C.gio_setCursor(C.NSUInteger(curID))
|
||||
return to
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user