Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Incorrect Mouse Interaction bounds with Non-Native Resolution #799

Open
zuixalias opened this issue Jan 29, 2025 · 3 comments
Open

Comments

@zuixalias
Copy link

Problem description

When the display resolution mode is set to a non-native resolution in the Output -> Display resolution mode setting, mouse cursor positioning and interaction with screen boundaries are incorrect.

The issue is observed when using a mouse as the input device. Touch input for cursor movement appears to function correctly:
https://mega.nz/file/Fd5D2RBb#vG8vZ-WqkVaB2tuZKJ0wO3QsS1EI5UDoLyfzRAstvAQ

(I'm yet to test for any config issues on my side, this is an initial report)

What steps will reproduce the bug?

  • Set Preferences -> output -> Display resolution mode to exact
  • Move the cursor inside the graphical session to observe the issue

What is the expected behavior?

No response

@twaik
Copy link
Member

twaik commented Jan 29, 2025

Is it a physical mouse?

@twaik
Copy link
Member

twaik commented Jan 29, 2025

Probably you should post output of termux-x11-preference list command, I can not reproduce the bug.

@zuixalias
Copy link
Author

Is it a physical mouse?

Yes

Output of termux-x11-preference list:

Click to expand
"hideCutout"="true"
"displayStretch"="false"
"notificationButton1Action"="exit"
"forceOrientation"="no"
"adjustResolution"="true"
"tapToMove"="false"
"enableAccessibilityServiceAutomatically"="false"
"backButtonAction"="toggle soft keyboard"
"adjustHeightForEK"="false"
"notificationTapAction"="open preferences"
"showAdditionalKbd"="false"
"stylusButtonContactModifierMode"="false"
"additionalKbdVisible"="true"
"opacityEKBar"="100"
"displayResolutionCustom"="1280x1024"
"stylusIsMouse"="false"
"clipboardEnable"="true"
"extra_keys_config"="[['ESC','/',{key: '-', popup: '|'},'HOME','UP','END','PGUP','PREFERENCES'], ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN','KEYBOARD']]"
"pauseKeyInterceptingWithEsc"="false"
"mediaKeysAction"="no action"
"preferScancodes"="true"
"storeSecondaryDisplayPreferencesSeparately"="false"
"showIMEWhileExternalConnected"="false"
"useTermuxEKBarBehaviour"="false"
"showMouseHelper"="false"
"transformCapturedPointer"="No"
"displayResolutionExact"="1920x1080"
"keepScreenOn"="true"
"pointerCapture"="false"
"swipeDownAction"="toggle additional key bar"
"touchMode"="Trackpad"
"dexMetaKeyCapture"="false"
"scaleTouchpad"="true"
"hardwareKbdScancodesWorkaround"="false"
"notificationButton0Action"="open preferences"
"volumeUpAction"="no action"
"fullscreen"="true"
"enableGboardCJK"="false"
"Reseed"="true"
"PIP"="false"
"capturedPointerSpeedFactor"="100"
"displayResolutionMode"="native"
"swipeUpAction"="no action"
"filterOutWinkey"="false"
"displayScale"="100"
"volumeDownAction"="no action"
"showStylusClickOverride"="false"

Observations from a little testing:

  • The issue only occurs with a physical mouse; touch input (finger gestures) works fine
  • The issue only happens when using exact or custom resolution settings. It does not occur with native or scaled resolution modes
  • Rotating the screen (switching to vertical and back to horizontal) makes the issue more pronounced - after rotation, the mouse cursor becomes restricted, unable to move beyond certain right and bottom boundaries

Possible cause (speculative):

When using exact or custom resolutions, the graphical session is centered on the display, however, the input boundary checks (determining whether the cursor is within valid screen space) may still be using non-centered or differently scaled bounds.
This mismatch between the graphical session’s rendered position and the cursor’s allowed movement range could be causing the restriction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants