emilk / emilk/egui

Touch position mismatch in split screen (Android)

Open
#7,491 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Describe the bug**
I'm using egui (0.32) + egui_winit + egui_wgpu.
On Android, when using split-screen feature in an egui app, the visible content doesn't match the touch position. This happens because the app is running fullscreen, but in split-screen mode the android top bar is always visible, offsetting the visible ui content, but touch events still occur as if the app was running in fullscreen mode.

**To Reproduce**
Steps to reproduce the behavior:
1. Expand your android egui app to fullscreen (hide the system topbar)
2. Test the app, the buttons should click where you place your finger
3. Switch to split screen mode. The app is now displayed at half size, the top bar is visible
4. The ui is now shifted down by the size of the top bar. Taps cause misses

**Expected behavior**
Touch events are accurate regardless of the visibility of the android top bar

**Smartphone (please complete the following information):**
- Device: Samsung Galaxy A52 5G
- OS: Android 14

Contributor guide

Open the contributing guide

Research direction

Start by tracing Android touch-coordinate handling in egui_winit and how the egui_wgpu app receives its window dimensions and insets. Reproduce the issue by switching from fullscreen to split-screen on Android 14, then verify that touches align with the visible UI despite the top bar.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, rust
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.