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:
Elias Naur
2021-08-16 15:44:48 +02:00
parent 71c5a134d7
commit 71f834d26f
+5 -9
View File
@@ -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
} }