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

Touchpad right-click cancel and two-finger gesture axis inversion issue #419

Open
hansm629 opened this issue Aug 8, 2023 · 43 comments · May be fixed by #617
Open

Touchpad right-click cancel and two-finger gesture axis inversion issue #419

hansm629 opened this issue Aug 8, 2023 · 43 comments · May be fixed by #617

Comments

@hansm629
Copy link

hansm629 commented Aug 8, 2023

Thank you for the new build.
Most of the Galaxy Tab S8+ keyboard cover touchpad compatibility is improved in the latest build. :)

Reports additional symptoms identified during the test.

SHANA.20230808_214102.mp4

1. touchpad right-click cancel
If you click right on the touchpad, the click result seems to be canceled. (Video 00:09~00:20)

2. two-finger gesture axis inversion issue
eaacb2ff-e151-4059-ba1b-dcb517d4da2c

Two-finger gestures confirmed the symptoms of reversing the axis when moving up, down, left, and right. (video 00:22~00:30)

log_20230808.txt
The log file is here.

@twaik
Copy link
Member

twaik commented Aug 8, 2023

Your log is taken from version without some debugging lines. Try to reproduce the same movements with this:
app-arm64-v8a-debug.zip
And post the log again please.

@twaik
Copy link
Member

twaik commented Aug 8, 2023

@Giova445 can you please make the same thing?

@shiumano
Copy link

shiumano commented Aug 8, 2023

I am using Xperia 5 ii and when I capture the physical mouse the X and Y are flipped

@hansm629
Copy link
Author

hansm629 commented Aug 9, 2023

Your log is taken from version without some debugging lines. Try to reproduce the same movements with this: app-arm64-v8a-debug.zip And post the log again please.

In this APK, the symptoms of reversing the x and y axes appear again as in the past.

This is the log file.
log_20230809.txt

@twaik
Copy link
Member

twaik commented Aug 9, 2023

@Rmtdi do the same thing.

@twaik
Copy link
Member

twaik commented Aug 9, 2023

I am using Xperia 5 ii and when I capture the physical mouse the X and Y are flipped

Give me some details.

@Rmtdi
Copy link

Rmtdi commented Aug 9, 2023

After using that version apk, my problem was fixed :), and I don't know how to get the log file, this file doesn't look right, hope it helps.
1603rmtdilog.txt

@Giova445
Copy link

Giova445 commented Aug 11, 2023

@twaik here's the log, I've tested so far with the build Making termux-x11 command work on Android 14+ (termux/termux-packages… but I'm still having the two-finger axis inversion issue, tested on galaxy tab s7+

test1.txt

@twaik
Copy link
Member

twaik commented Aug 11, 2023

@Giova445 that is probably because I did not commit the fix. I stil can not reproduce it on my local devices and changes I made to fix it most likely break compatibility for other devices. I should test real touchpad and after that I will make some other changes...

@twaik
Copy link
Member

twaik commented Mar 24, 2024

@AlphaBs can you please check if you can fix this?

@AlphaBs
Copy link
Contributor

AlphaBs commented Mar 24, 2024

I see you've added a new option and I can't wait to try it, but I'm currently unable to use my device for about two weeks for security reasons. 😭

@twaik
Copy link
Member

twaik commented Mar 25, 2024

@hansm629 Is Touchpad right-click cancel still reproducible? I see some code in master branch that handles it.

@hansm629
Copy link
Author

@twaik
I'll test it out after work!
We will respond within 2 hours! :)

@twaik
Copy link
Member

twaik commented Mar 25, 2024

Also you can check the new preference "transform captured pointer movements".

@twaik
Copy link
Member

twaik commented Mar 25, 2024

It is not a fix, but at least you can make your touchpad behave more predictable.

@twaik
Copy link
Member

twaik commented Mar 31, 2024

@hansm629

We will respond within 2 hours! :)

@hansm629
Copy link
Author

@hansm629

We will respond within 2 hours! :)

I'm going out for a while right now.
I'll tell you the test results when I get back home! :)

@twaik
Copy link
Member

twaik commented Apr 1, 2024

@hansm629 this issue is the last one.
Any updates?

@hansm629
Copy link
Author

hansm629 commented Apr 1, 2024

@twaik

As of latest #597 build

If you adjust the Transform captured point movements option, the axis of the mouse point connected via Bluetooth is reversed, but

The touchpad on the keyboard cover not applied and the mouse point axis is reversed, making it impossible to use normal gestures.

  • Double tap function does not work
  • Two-finger gestures must be moved in the opposite direction to work as desired.
2024_04_02.01_31.mp4
2024_04_02.01_31.1.mp4

@hansm629
Copy link
Author

hansm629 commented Apr 1, 2024

@twaik
Still, it seems like the touchpad right-click cancel has been fixed.

@twaik
Copy link
Member

twaik commented Apr 1, 2024

The touchpad on the keyboard cover not applied and the mouse point axis is reversed, making it impossible to use normal gestures.

I did not really understand this sentence. Can you please tell it in other words?

@hansm629
Copy link
Author

hansm629 commented Apr 1, 2024

@twaik
Oh sorry.
I am not good at English, so I have to use a translator.

This means that the new Transform captured point movements option does not apply to the touchpad of the Galaxy Tab S9 Ultra keyboard cover.

@twaik
Copy link
Member

twaik commented Apr 1, 2024

@AlphaBs how do you think, can we make DexListener's GestureDetector use standard practices for detecting gestures like single and doubletap? Currently it is limited to scrolling detection.
I am not sure how exactly to deal with GestureDetector and custom Samsung flags.

@AlphaBs
Copy link
Contributor

AlphaBs commented Apr 3, 2024

I don't think that GestureDetector can handle the custom flags which Samsung touchpad produces, but I will test it later.

and 'double tap', I can't see any differences between double tap event and single tap event on my device. no special flag, no classification. it just reports normal single tap event but twice.

@knyipab
Copy link
Contributor

knyipab commented Apr 20, 2024

I encountered the same flipped pointer axis issue in Dex mode when I use my Samsung Fold 5 phone as trackpad in landscape orientation (it's normal in portrait orientation). Even worse, the left click does not work at all. If developers do not own a Samsung device or cannot reproduce, I could record log and post it. Thank you.

@twaik
Copy link
Member

twaik commented Apr 21, 2024

Recording log will not help. I must have an ability to test things in real time.
I don't have the energy or the time to implement this.

@knyipab
Copy link
Contributor

knyipab commented Apr 21, 2024

I am happy to help but I'm very unfamiliar with your code. Could you give me hint on which file I should begin with for this matter?

@twaik
Copy link
Member

twaik commented Apr 26, 2024

Could you give me hint on which file I should begin with for this matter?

https://github.com/termux/termux-x11/blob/master/app/src/main/java/com/termux/x11/input/TouchInputHandler.java

@knyipab knyipab linked a pull request Apr 28, 2024 that will close this issue
@knyipab
Copy link
Contributor

knyipab commented Apr 28, 2024

@hansm629 I made a pull request at #617 to fix the issue. See if you may want to try (as I don't own a pad with physical touchpad). An automatically built APK is available on the github action: https://github.com/termux/termux-x11/actions/runs/8864550086.

You will want to choose Automatic (for touchpad) under Transform captured point movements option.

@hansm629
Copy link
Author

hansm629 commented Apr 28, 2024

@knyipab
I tested the apk you build!

I set it to automatic.
Screenshot_20240428_132513_TermuxX11

The touchpad of the Galaxy Tab S9 Ultra keyboard cover is not inverted.
Right click, left click, gestures, etc. all work well.

but
Touchpad related
There is a symptom of returning to Android Home when an event occurs.

2024_04_28.13_28.mp4

Please check~

@knyipab
Copy link
Contributor

knyipab commented Apr 28, 2024

@hansm629
I suspect that's a crash (rather than returning to home), because Termux:X11 icon is shown everytime you re-open it.

If that's the case, a log by logcat may help.

@AlphaBs
Copy link
Contributor

AlphaBs commented Apr 28, 2024

@knyipab I have a same issue on Galaxy Tab S8+ bookcover keyboard. here is the log:

04-28 15:29:48.411 18845 18845 E InputEventSender: Exception dispatching finished signal for seq=167
04-28 15:29:48.412 18845 18845 E MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.Display.getRotation()' on a null object reference
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at com.termux.x11.input.TouchInputHandler$GestureListener.onScroll(TouchInputHandler.java:375)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.GestureDetector.onTouchEvent(GestureDetector.java:796)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at com.termux.x11.input.TouchInputHandler.handleTouchEvent(TouchInputHandler.java:205)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at com.termux.x11.input.TouchInputHandler.handleTouchEvent(TouchInputHandler.java:193)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at com.termux.x11.MainActivity.lambda$onCreate$7(MainActivity.java:209)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at com.termux.x11.MainActivity.$r8$lambda$jOPYNpAtVIB5FMMiAWscTrh8oJ8(MainActivity.java:0)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at com.termux.x11.MainActivity$$ExternalSyntheticLambda16.onCapturedPointer(R8$$SyntheticClass:0)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.View.dispatchCapturedPointerEvent(View.java:16295)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$ViewPostImeInputStage.processGenericMotionEvent(ViewRootImpl.java:8586)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8280)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7605)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7831)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7636)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7888)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7609)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7636)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7609)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7864)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:8106)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:4578)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:4012)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:4003)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager.-$$Nest$mfinishedInputEvent(Unknown Source:0)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:4555)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.os.MessageQueue.nativePollOnce(Native Method)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.os.MessageQueue.next(MessageQueue.java:335)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.os.Looper.loopOnce(Looper.java:187)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.os.Looper.loop(Looper.java:319)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at android.app.ActivityThread.main(ActivityThread.java:8913)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at java.lang.reflect.Method.invoke(Native Method)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
04-28 15:29:48.418 18845 18845 E MessageQueue-JNI: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: FATAL EXCEPTION: main
04-28 15:29:48.421 18845 18845 E AndroidRuntime: Process: com.termux.x11, PID: 18845
04-28 15:29:48.421 18845 18845 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.Display.getRotation()' on a null object reference
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at com.termux.x11.input.TouchInputHandler$GestureListener.onScroll(TouchInputHandler.java:375)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.GestureDetector.onTouchEvent(GestureDetector.java:796)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at com.termux.x11.input.TouchInputHandler.handleTouchEvent(TouchInputHandler.java:205)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at com.termux.x11.input.TouchInputHandler.handleTouchEvent(TouchInputHandler.java:193)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at com.termux.x11.MainActivity.lambda$onCreate$7(MainActivity.java:209)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at com.termux.x11.MainActivity.$r8$lambda$jOPYNpAtVIB5FMMiAWscTrh8oJ8(MainActivity.java:0)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at com.termux.x11.MainActivity$$ExternalSyntheticLambda16.onCapturedPointer(R8$$SyntheticClass:0)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.View.dispatchCapturedPointerEvent(View.java:16295)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$ViewPostImeInputStage.processGenericMotionEvent(ViewRootImpl.java:8586)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8280)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7605)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7831)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7636)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7888)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7609)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7636)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7609)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7864)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:8106)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:4578)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:4012)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:4003)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.-$$Nest$mfinishedInputEvent(Unknown Source:0)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:4555)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.os.MessageQueue.nativePollOnce(Native Method)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.os.MessageQueue.next(MessageQueue.java:335)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:187)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:319)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8913)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
04-28 15:29:48.421 18845 18845 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
04-28 15:29:48.472  2397  3467 E PackageManager: replace res.nonLocalizedLabel(null) to newName(Samsung Account) and activity.getPackageName() () UId(1000)
04-28 15:29:48.503  3053  3226 E CellUtil: calcBoundsForPosition. dockSide invalid. 
04-28 15:29:48.503  3053  3226 E CellUtil: calcBoundsForPosition. dockSide invalid. 
04-28 15:29:48.528  1600  3875 E NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::acquire()
04-28 15:29:48.531  3977  3977 E pageboostd: Received HALT command code 2
04-28 15:29:48.601 18247 18247 E IDS_TAG : System UID: no SharedPreferences here, no IDS
04-28 15:29:48.602 18247 18247 E IDS_TAG : System UID: no SharedPreferences here, no IDS
04-28 15:29:48.666  3977  3977 E pageboostd: Received HALT command code 2
04-28 15:29:49.104  1600  1600 E BpTransactionCompletedListener: Failed to transact (-32)
04-28 15:29:50.543  1600  3875 E NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::acquire()
04-28 15:29:50.640  2397  5698 E PackageManager: replace res.nonLocalizedLabel(null) to newName(Samsung Account) and activity.getPackageName() () UId(1000)
04-28 15:29:50.761  2397  2817 E WindowManager: win=Window{7fd5fb u0 com.samsung.android.lool/com.samsung.android.sm.iafd.dialog.AppErrorDialogActivity EXITING} destroySurfaces: appStopped=false cleanupOnResume=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.WindowState.onExitAnimationDone:5690 com.android.server.wm.WindowStateAnimator.onAnimationFinished:208 com.android.server.wm.WindowState.onAnimationFinished:5911 com.android.server.wm.WindowContainer$$ExternalSyntheticLambda4.onAnimationFinished:0 com.android.server.wm.SurfaceAnimator.cancelAnimation:400 com.android.server.wm.SurfaceAnimator.cancelAnimation:274 com.android.server.wm.WindowContainer.setParent:598 
04-28 15:29:51.147  2397  2453 E Watchdog: !@Sync: 87 heap: 88 / 109 FD: 1083 [2024-04-28 15:29:51.147]
04-28 15:29:52.110  2397  5644 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
04-28 15:29:52.111  2397  5644 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
04-28 15:30:00.034  1600  3875 E NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::acquire()
04-28 15:30:00.303  2397  3018 E ActivityTaskManager: TouchDown intent received, starting ActiveLaunch
04-28 15:30:00.380  3977  3977 E pageboostd: Received HALT command code 2
04-28 15:30:00.429  1600  1600 E BpTransactionCompletedListener: Failed to transact (-32)
04-28 15:30:00.536 17082 17199 E CmdEntryPoint: Somebody connected!
04-28 15:30:00.536 17082 17199 E CmdEntryPoint: New client connection!
04-28 15:30:00.588  3053  3226 E CellUtil: calcBoundsForPosition. dockSide invalid. 
04-28 15:30:00.589  3053  3226 E CellUtil: calcBoundsForPosition. dockSide invalid. 
04-28 15:30:00.617 19298 19313 E BufferQueueProducer: [](id:4b6200000002,api:0,p:4160,c:19298) query: BufferQueue has been abandoned
04-28 15:30:00.617 19298 19345 E BufferQueueProducer: [](id:4b6200000002,api:0,p:4160,c:19298) query: BufferQueue has been abandoned
04-28 15:30:00.621  3977  3977 E pageboostd: Received HALT command code 2
04-28 15:30:00.623 17082 17198 E tx11-request: window changed: 2800 1752
04-28 15:30:00.623 17082 17198 E tx11-request: window changed: 2800 1752
04-28 15:30:00.685 17082 17198 E tx11-request: window changed: 2800 1752
04-28 15:30:00.832  2397  3468 E WindowManager: win=Window{7f75e50 u0 com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity} destroySurfaces: appStopped=true cleanupOnResume=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8 caller=com.android.server.wm.ActivityRecord.destroySurfaces:6900 com.android.server.wm.ActivityRecord.destroySurfaces:6881 com.android.server.wm.ActivityRecord.activityStopped:7576 com.android.server.wm.ActivityClientController.activityStopped:310 android.app.IActivityClientController$Stub.onTransact:702 com.android.server.wm.ActivityClientController.onTransact:175 android.os.Binder.execTransactInternal:1380 
04-28 15:30:02.228 19298 19298 E InputEventSender: Exception dispatching finished signal for seq=51
04-28 15:30:02.228 19298 19298 E MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.Display.getRotation()' on a null object reference
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at com.termux.x11.input.TouchInputHandler$GestureListener.onScroll(TouchInputHandler.java:375)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.GestureDetector.onTouchEvent(GestureDetector.java:796)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at com.termux.x11.input.TouchInputHandler.handleTouchEvent(TouchInputHandler.java:205)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at com.termux.x11.input.TouchInputHandler.handleTouchEvent(TouchInputHandler.java:193)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at com.termux.x11.MainActivity.lambda$onCreate$7(MainActivity.java:209)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at com.termux.x11.MainActivity.$r8$lambda$jOPYNpAtVIB5FMMiAWscTrh8oJ8(MainActivity.java:0)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at com.termux.x11.MainActivity$$ExternalSyntheticLambda16.onCapturedPointer(R8$$SyntheticClass:0)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.View.dispatchCapturedPointerEvent(View.java:16295)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$ViewPostImeInputStage.processGenericMotionEvent(ViewRootImpl.java:8586)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8280)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7605)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7831)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7636)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7888)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7609)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7636)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7609)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7864)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:8106)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:4578)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:4012)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:4003)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager.-$$Nest$mfinishedInputEvent(Unknown Source:0)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:4555)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.os.MessageQueue.nativePollOnce(Native Method)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.os.MessageQueue.next(MessageQueue.java:335)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.os.Looper.loopOnce(Looper.java:187)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.os.Looper.loop(Looper.java:319)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at android.app.ActivityThread.main(ActivityThread.java:8913)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at java.lang.reflect.Method.invoke(Native Method)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
04-28 15:30:02.235 19298 19298 E MessageQueue-JNI: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: FATAL EXCEPTION: main
04-28 15:30:02.238 19298 19298 E AndroidRuntime: Process: com.termux.x11, PID: 19298
04-28 15:30:02.238 19298 19298 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.Display.getRotation()' on a null object reference
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at com.termux.x11.input.TouchInputHandler$GestureListener.onScroll(TouchInputHandler.java:375)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.GestureDetector.onTouchEvent(GestureDetector.java:796)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at com.termux.x11.input.TouchInputHandler.handleTouchEvent(TouchInputHandler.java:205)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at com.termux.x11.input.TouchInputHandler.handleTouchEvent(TouchInputHandler.java:193)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at com.termux.x11.MainActivity.lambda$onCreate$7(MainActivity.java:209)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at com.termux.x11.MainActivity.$r8$lambda$jOPYNpAtVIB5FMMiAWscTrh8oJ8(MainActivity.java:0)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at com.termux.x11.MainActivity$$ExternalSyntheticLambda16.onCapturedPointer(R8$$SyntheticClass:0)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.View.dispatchCapturedPointerEvent(View.java:16295)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewGroup.dispatchCapturedPointerEvent(ViewGroup.java:2044)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$ViewPostImeInputStage.processGenericMotionEvent(ViewRootImpl.java:8586)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8280)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7605)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7831)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7636)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7888)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7609)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7636)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7609)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7662)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7628)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7864)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:8106)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:4578)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:4012)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:4003)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.-$$Nest$mfinishedInputEvent(Unknown Source:0)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:4555)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.os.MessageQueue.nativePollOnce(Native Method)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.os.MessageQueue.next(MessageQueue.java:335)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:187)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:319)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8913)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
04-28 15:30:02.238 19298 19298 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
04-28 15:30:02.293  2397  2424 E PackageManager: replace res.nonLocalizedLabel(null) to newName(Samsung Account) and activity.getPackageName() () UId(1000)
04-28 15:30:02.298  3053  3226 E CellUtil: calcBoundsForPosition. dockSide invalid. 
04-28 15:30:02.298  3053  3226 E CellUtil: calcBoundsForPosition. dockSide invalid. 
04-28 15:30:02.327  1600  3875 E NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::acquire()
04-28 15:30:02.382  1486  1516 E ANDR-PERF-UTIL: Failed to update node /proc/sys/walt/sched_per_task_boost with value 19298 0
04-28 15:30:02.383  1486  1516 E ANDR-PERF-OPTSHANDLER: can't reset task 19298
04-28 15:30:02.383  1486  1516 E ANDR-PERF-RESOURCEQS: Failed to reset optimization [3, 32]
04-28 15:30:02.736  1600  1600 E BpTransactionCompletedListener: Failed to transact (-32)
04-28 15:30:03.625  2397  3027 E Pageboost: ioinfo read failed
04-28 15:30:04.386  2397  5644 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
04-28 15:30:04.387  2397  5644 E TaskPersister: File error accessing recents directory (directory doesn't exist?).

@AlphaBs
Copy link
Contributor

AlphaBs commented Apr 28, 2024

@knyipab it only occurs when 'Transform captured pointer movements' is set to 'Automatic'.
with Counter clockwise option, all gestures work well on my device!

@knyipab
Copy link
Contributor

knyipab commented Apr 28, 2024

Thanks a lot. I see why.

I own a folding device which has two screens and I usually use my unfolded screen (i.e. displayID=1) as touchpad. So I hardcoded that into code, but that does not exist for tablets. I think the right approach would be testing from display=0 to higher number whether the screen is ON.

It's not diffcult but I went outdoors. Will fix it, probably later tomorrow.

@knyipab
Copy link
Contributor

knyipab commented Apr 29, 2024

As promised, I updated my pull request and you may try the new automatic build at https://github.com/termux/termux-x11/actions/runs/8882154871.

I suppose Automatic (for touchpad) is preferred over Clockwise clockwise when you switch between touchpad and a mouse (which may also transformed in Clockwise clockwise). Also, DeX soft touchpad user will like this functionality as they rotate their device.

@hansm629
Copy link
Author

hansm629 commented May 1, 2024

@knyipab
Test results with the latest build apk

Termux-x11 does not crash with the automatic setting, but
The pointer is too fast and the right and left clicks on the touchpad don't work.

For older versions of the apk, although Termux-x11 crashed.
In automatic state, the point is not reversed and the speed is not fast.
Right click and left click on the touchpad worked.
(Although Termux-X11 crashed while working)

@AlphaBs
Copy link
Contributor

AlphaBs commented May 1, 2024

@knyipab it works with automatic mode. the poitner speed is normal on my device. (100% captured pointer speed)
However it seems it can't handle events that occur when buttons on the touchpad is pressed.
I'm not sure which code is responsible to handle them but it should handle MotionEvent.ACTION_BUTTON_PRESS and MotionEvent.ACTION_BUTTON_RELEASE like DexListener does.

@knyipab
Copy link
Contributor

knyipab commented May 2, 2024

@hansm629 Few things to note

  • For pointer speed, it should be unrelated to PR Dex touchpad fix: orientation, click, gesture, etc. #617 . If you use "native" resolution, there should be no speed difference before and after pointer capture. You may also try toggling "apply display scale factor to touchpad" which may or may not work. I also encounter the pointer speed difference. You may open another issue and that should be handled separately.
  • FYI, I believe that the app crash right after pointer capture in my previously built apk, so that doesn't count and not comparable.

@AlphaBs (and @hansm629)
May I verify:

  • Do tap click (not button) i.e. 1-point-tap left click and 2-point-tap right click work for your touchpad?
  • So it's only the physical left/right click button does not work, right?
  • And therefore "counter clockwise" option sees the same beahviour, right?

The complication lies on different beharviour across soft and hard touchpad. In my apk build, the touchpad is handled the same way as touchscsreen, i.e. TapGestureDetector#onTouchEvent() -> GestureListener#onScroll(). In the current nightly apk release, touchpad events are likely handled by HardwareMouseListener#onTouch(). Shall I implement also e.getButtonState()?

@AlphaBs
Copy link
Contributor

AlphaBs commented May 2, 2024

@knyipab

Do tap click (not button) i.e. 1-point-tap left click and 2-point-tap right click work for your touchpad?
So it's only the physical left/right click button does not work, right?

Yes. All touch gestures like tapping, scrolling, dragging work perfectly. Only the physical click does not work.

And therefore "counter clockwise" option sees the same beahviour, right?

It's same regardless of the option.

Shall I implement also e.getButtonState()?

I think so. I recorded touch events before maybe this would help: #587

@knyipab
Copy link
Contributor

knyipab commented May 4, 2024

@AlphaBs Thanks. Implemented e.getButtonState() with this commit, apk build available at this action.

@hansm629
Copy link
Author

hansm629 commented May 7, 2024

@knyipab
hello.

I tested it with the newly built apk. (Setting: Automatic)

Galaxy Tab S9 Ultra Keyboard Cover Touchpad
Right click, left click, and various gesture functions work very well, but

The point speed is too fast, making precise use difficult.

Even if you manually adjust the point speed, it is not reflected.
Could you please check?

@knyipab
Copy link
Contributor

knyipab commented May 9, 2024

Fixed with most recent commit (apk build here). The option Captured pointer speed factor, % should now take effect on captured touchpad pointer.

Nonethelss, there is another pointer speed issue (even for current Termux:x11 build, not a problem of PR#617). On my device, the speed of touchpad pointer and hardware mouse pointer are similar before capture, but after being captured, the touchpad speed is way faster comapred to hardware mouse. My gut feeling is that Android (or vendor) probably scale touchpad and mouse raw offsets at different factors. There seems no easy fix other than introducing a new speed option for captured touchpad, but not sure if that is welcomed by this project.

@AlphaBs
Copy link
Contributor

AlphaBs commented May 15, 2024

@knyipab thank you! it works perfectly with my device

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

Successfully merging a pull request may close this issue.

7 participants