feat(tao): forward back/forward mouse buttons to Compose - #728
Merged
kdroidFilter merged 1 commit intoSep 25, 2026
Merged
kdroidFilter merged 1 commit into
kdroidFilter merged 1 commit into
Conversation
Collaborator
|
Can you target the nucleus 2.6 branch? Thank you very much! |
skyecodes
force-pushed
the
feature/navigation_mouse_buttons
branch
from
September 25, 2026 12:47
ace865f to
c784a88
Compare
Author
|
Rebased onto nucleus-2.6 and changed the target branch. |
kdroidFilter
merged commit Sep 25, 2026
899a883
into
NucleusFramework:nucleus-2.6
4 of 8 checks passed
Collaborator
|
thank you very much, you will be able to test it soon in the dev version 2.6.0-dev-202609251324 |
Author
Thanks for the dev release! I tested it on my application on Linux & Windows and it works fine 👍 I don't have a macOS machine so I couldn't test it on macOS unfortunately. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Description
Passes the mouse back/forward side buttons through to Compose as
PointerButton.Back/PointerButton.Forwardon the Tao backend.Kotlin
TaoMouseButton: addsBACK = 3andFORWARD = 4, and movesOTHERfrom3to5.AbstractTaoComposeSceneHost.mapButtonandTaoPopupSceneLayerLinux: map the new codes toPointerButton.Back/PointerButton.Forward.Native
events.rs: the RustMOUSE_BUTTON_*codes now match Kotlin (BACK = 3,FORWARD = 4,OTHER = 5).MouseButton::Other(n)is mapped per OS: WindowsXBUTTON1/XBUTTON2(1/2), Linux GDK buttons 8/9, macOSNSEvent.buttonNumber3/4.otherMouseDown:/otherMouseUp:readNSEvent.buttonNumberinstead of always reportingMiddle.nucleus_tao_linux_widget.c: theNativeViewcapture boxes map GDK buttons 8/9 to back/forward. Before, the raw number went through and Kotlin treated it as a Primary click.Tests / API
TaoMouseButtonWireDriftTest(new): fails if theevents.rsMOUSE_BUTTON_*values andTaoMouseButtonstop matching.TaoMouseButton.BACK/FORWARDfields.Not covered: the X11/macOS native popup panels (
WIRE_BUTTON_*) and the WindowsNativeViewblending overlay still only handle primary/secondary/tertiary, so side buttons are dropped there.📄 Motivation and Context
Side buttons are the usual way to go back/forward in apps with history (browsers, file managers, docs viewers). On Tao they never reached Compose correctly:
🧪 How Has This Been Tested?
On Linux (x64):
cargo checkof the native crate passes.buildNativeLinux.:decorated-window-tao:test --tests '*TaoMouseButtonWireDriftTest*'passes.:decorated-window-tao:detektandktlintCheckpass.apiDumphas been regenerated.Not yet tested:
NSEvent::buttonNumber()fromobjc2-app-kit)📦 Types of changes
✅ Checklist