kbm: the click that focuses the window is not a press #1163
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1172"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T12:50:01Z.
Keyboard and mouse as a gamepad: clicking the XCL window to bring it back to the front also pulled the right trigger.
applyreads the buttons withGetAsyncKeyState, and starts doing so as soon as the window has the focus again, while the focusing click's button is still held. In a title where the right trigger fires, every click into the window fired once.A small
Buttonsstate now ignores a left, right or middle button that is already down when the window gets the focus, until that button is let go. The state is cleared where the mouse state is already reset: on focus loss and when a window drag or resize starts. The middle button (right stick click) moved out ofVK_KEYSso it goes through the same check.What is in it
crates/xcl/src/hle/kbm.rs:Buttons, kept in the mouse state and used byapply; testthe_click_that_focuses_the_window_is_no_press.Tested
cargo test --workspace -- --test-threads=4onb385b89: 742 passed, 0 failed, 41 ignored; no SKIPPED GPU testsleft: 1,right: 0); with the changecargo test -p xcl --lib hle::kbmpasses, 7 passedRegression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-24T13:45:36Z.
NVIDIA run with the whole suite, since Not tested lists NVIDIA.
Tested
stable-x86_64-pc-windows-msvc; debugb385b898eb28047623f703102637006954c5c149(on its base47efa2e):cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored, the same as yoursmain930e8b4(no conflict;mainhas gained ten commits since your base): 752 passed, 0 failed, 41 ignoredButtons::pressedreturningdown(every held button a press),kbm::tests::the_click_that_focuses_the_window_is_no_pressfails withleft: 1, right: 0hle::kbmtests, 10 runs: 10 of 10 passed (7 each)gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareNot tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T07:46:44Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T14:37:55Z.
Test report for
b385b898eb28047623f703102637006954c5c149(this PR's head), for #1607.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09)x86_64-pc-windows-msvc, debug.cargo build --workspace, thencargo test --workspace -- --test-threads=4at the head: 742 passed, 0 failed, 41 ignored.gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64).Regression run (retail title,
scripts/smoke.ps1 -Seconds 60, release;mainbuilt from the commit in its block, this PR from its head, no uncommitted changes)main:
this PR:
Peak commit is over the 125 % rule: this PR's run peaked at 25 443 MB, 155 % of
main's 16 384 MB (frames: within 80 %). I can't tell from this whether the PR causes it: this branch is based on47efa2e490 commits older than themaincommit (06c9f55) its run is compared with and each side was run once. A smoke run of47efa2eitself or of this PR rebased onto currentmainwould separate the two.Not tested
AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:42:11Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:59:08Z.
Triage (#1607) – head
b385b89#1175 is stacked on this PR (it contains this commit plus the swapped-button change); that is not a duplicate. No other open or merged PR ignores the click that focuses the window; main has no equivalent.
No problems found in
kbm.rs:Buttons::pressed. The PR conflicts with main: #1824 moved the mouse buttons intoInputProfile::apply_keys(left_trigger/right_trigger/MouseMiddlebindings), so the focus filter has to be reapplied there, for any key bound to a mouse button.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.