fix(input): Keep the Android pointer hidden over the game after hovering session menus (#2176)

* fix(input): Keep the Android pointer hidden over the game after hovering session menus

* fix(input): Defer the overlay pointer icon from a container, since ComposeView is final
This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-11-06 13:56:30 -05:00
1 parent 5f180d909b
commit 116728917f
1 file changed
+5 -2
@@ -831,7 +831,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
window.setBackgroundDrawable(android.graphics.drawable.ColorDrawable(it))
}
sessionOverlay = createSessionOverlay()
root.addView(sessionOverlay)
root.addView(object : FrameLayout(this) {
override fun onResolvePointerIcon(event: MotionEvent, pointerIndex: Int): android.view.PointerIcon? =
if (platformPointerShown == true) super.onResolvePointerIcon(event, pointerIndex) else null
}.apply { addView(sessionOverlay) })
setContentView(root)
glassesScope.launch { Glasses.state.collect {
glasses = it
@@ -4087,7 +4090,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
private fun appUiOwnsPointer(): Boolean =
drawerOpen || pcKeyboardOpen || achievementsOpen || pipUi || glassesOutputActive || bottomOutputActive || touchEditorOpen
drawerOpen || pcKeyboardOpen || achievementsOpen || pipUi || glassesOutputActive || bottomOutputActive || touchEditorOpen || wowChatOnTop
private fun applyPlatformPointer(shown: Boolean) {
if (!::sessionRoot.isInitialized || !::surfaceView.isInitialized) return