When running in popup mode, AMotionEvent_getY returns the starting position including the top bar, not the starting position of the viewport

Please tell me how to get the input coordinates relative to the viewport.

Or, please tell me how to know the top bar height value in popup mode.

Can you please provide us with screenshots and code snippets so we can understand the issue better?