[PR #6464] Fix 3 different bugs in the WPF control #26697

Open
opened 2026-01-31 09:17:36 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/6464

State: closed
Merged: Yes


  • [wpf] WM_KEYUP crashes on x64 #6444

    • Turns out that doing the (uint)lParam cast worked fine for the
      keydowns, because the value of lParam usually didn't have super
      high-order bits set. That's not the case for keyups, where the 30th
      bit is always set. This is fixed by explicitly getting the byte
      with the scancode in it.
  • [wpf] WM_KEYUP generates wrong value in Win32 input mode #6445

    • This was fixed by basically the same thing as the above.
  • [wpf] WPF control crashes on startup trying to render cursor #6446

    • This was a regression from #6337. I forgot to initialize the brush
      used to paint the cursor, because the UWP version always uses color
      (but the WPF one relies on the text foreground color).
  • Also adds a minor change to the WPF test app, so that the user can
    actually exit win32-input-mode.

  • #6337 regressed #6446

  • #6309 regressed the other two.

Closes #6444
Closes #6445
Closes #6446

**Original Pull Request:** https://github.com/microsoft/terminal/pull/6464 **State:** closed **Merged:** Yes --- * [wpf] WM_KEYUP crashes on x64 #6444 - Turns out that doing the `(uint)lParam` cast worked fine for the keydowns, because the value of lParam usually didn't have super high-order bits set. That's not the case for keyups, where the 30th bit is _always_ set. This is fixed by explicitly getting the byte with the scancode in it. * [wpf] WM_KEYUP generates wrong value in Win32 input mode #6445 - This was fixed by basically the same thing as the above. * [wpf] WPF control crashes on startup trying to render cursor #6446 - This was a regression from #6337. I forgot to initialize the brush used to paint the cursor, because the UWP version always uses color (but the WPF one relies on the text foreground color). * Also adds a minor change to the WPF test app, so that the user can actually exit `win32-input-mode`. * #6337 regressed #6446 * #6309 regressed the other two. Closes #6444 Closes #6445 Closes #6446
claunia added the pull-request label 2026-01-31 09:17:36 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26697