Closed hansm629 closed 2 months ago
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.
@Giova445 can you please make the same thing?
I am using Xperia 5 ii and when I capture the physical mouse the X and Y are flipped
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
@Rmtdi do the same thing.
I am using Xperia 5 ii and when I capture the physical mouse the X and Y are flipped
Give me some details.
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
@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+
@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...
@AlphaBs can you please check if you can fix this?
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. š
@hansm629 Is Touchpad right-click cancel
still reproducible? I see some code in master branch that handles it.
@twaik I'll test it out after work! We will respond within 2 hours! :)
Also you can check the new preference "transform captured pointer movements".
It is not a fix, but at least you can make your touchpad behave more predictable.
@hansm629
We will respond within 2 hours! :)
@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! :)
@hansm629 this issue is the last one. Any updates?
@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.
https://github.com/termux/termux-x11/assets/101167173/328650ce-0e7b-4dc4-8b49-6cd3fa63d294
https://github.com/termux/termux-x11/assets/101167173/09829c61-9686-4bda-88a5-11cfe795bf61
@twaik Still, it seems like the touchpad right-click cancel has been fixed.
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?
@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.
@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.
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.
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.
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.
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?
Could you give me hint on which file I should begin with for this matter?
@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.
@knyipab I tested the apk you build!
I set it to automatic.
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.
https://github.com/termux/termux-x11/assets/101167173/53335f42-df00-462d-91a9-049fdf98ce7d
Please check~
@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.
@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?).
@knyipab it only occurs when 'Transform captured pointer movements' is set to 'Automatic'. with Counter clockwise option, all gestures work well on my device!
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.
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.
@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)
@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.
@hansm629 Few things to note
@AlphaBs (and @hansm629) May I verify:
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()
?
@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
@AlphaBs Thanks. Implemented e.getButtonState()
with this commit, apk build available at this action.
@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?
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.
@knyipab thank you! it works perfectly with my device
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.
https://github.com/termux/termux-x11/assets/101167173/c6a5627b-8a05-49c5-93d1-0b858b7da1ab
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
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.