Windows hardening - #124
Open
waywardmonkeys wants to merge 9 commits into
Open
waywardmonkeys wants to merge 9 commits into
waywardmonkeys wants to merge 9 commits into
Conversation
Bind each reducer to one HWND and return normalized input together with an explicit window-procedure response. Consume WM_TOUCH after closing its native handle, preserve the required TRUE result for handled X-button messages, and expose a single recognized-message table for hosts.
Decode signed coordinates from each button and wheel message, clear pressed state when capture is stolen, and keep tap counters scoped to the affected pointer. Offset touch IDs past the reserved primary ID and suppress legacy mouse messages promoted from touch input.
Honor the core ScrollDelta navigation-direction contract across the Windows and winit adapters. Preserve the Windows page-scroll preference as PageDelta, suppress disabled scrolling, and read system preferences through the correct UINT representation.
Preserve ToUnicode output without mutating keyboard state, distinguish modifier sides and AltGr, and report composition state on key events. Translate WM_CHAR UTF-16 and retain both IME result and composition updates from combined messages.
Add per-window IME activation and cursor-area controls, preserve native candidate UI while suppressing application-rendered preedit UI, and reapply geometry across scale changes. Track IME session and preedit state separately so disabling and late Hangul commits produce coherent text-event ordering.
Add ui-events-windows to the MSRV and generated README checks, and build its public documentation on a native Windows runner.
RagibHasin
reviewed
Jul 21, 2026
Comment on lines
+76
to
+78
| const SIGNATURE_MASK: usize = 0xffff_ff00; | ||
| const MI_WP_SIGNATURE: usize = 0xff51_5700; | ||
| const MI_WP_TOUCH: usize = 0x80; |
RagibHasin
reviewed
Jul 21, 2026
| struct ImeContext<'m> { | ||
| hwnd: HWND, | ||
| himc: HIMC, | ||
| _lifetime: PhantomData<&'m ()>, |
There was a problem hiding this comment.
I think this _lifetime is superfluous. I tried this to ensure that the context is live for the duration of lparam but I don't think that can be encoded like this.
RagibHasin
reviewed
Jul 21, 2026
| }; | ||
| use ui_events::{ScrollDelta, text::TextInputEvent}; | ||
| use ui_events::{ | ||
| ScrollDelta, |
|
Having getters for |
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.
This is to see if CI passes and allow @RagibHasin to see some of what might be useful.