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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/6464
Author: @zadjii-msft
Created: 6/11/2020
Status: Merged
Merged: 6/11/2020
Merged by: @undefined

Base: masterHead: dev/migrie/b/wpf-control-fixes


📝 Commits (1)

  • b3b2d9b Fix like 3 different bugs in the WPF control

📊 Changes

4 files changed (+38 additions, -16 deletions)

View changed files

📝 src/cascadia/WpfTerminalControl/TerminalContainer.cs (+17 -8)
📝 src/cascadia/WpfTerminalTestNetCore/WpfTerminalTestNetCore/MainWindow.xaml.cs (+16 -3)
📝 src/renderer/dx/CustomTextRenderer.cpp (+1 -1)
📝 src/renderer/dx/CustomTextRenderer.h (+4 -4)

📄 Description

  • [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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/6464 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 6/11/2020 **Status:** ✅ Merged **Merged:** 6/11/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/b/wpf-control-fixes` --- ### 📝 Commits (1) - [`b3b2d9b`](https://github.com/microsoft/terminal/commit/b3b2d9bda665e0d9f494c1bee596ec0fce6d76a7) Fix like 3 different bugs in the WPF control ### 📊 Changes **4 files changed** (+38 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/WpfTerminalControl/TerminalContainer.cs` (+17 -8) 📝 `src/cascadia/WpfTerminalTestNetCore/WpfTerminalTestNetCore/MainWindow.xaml.cs` (+16 -3) 📝 `src/renderer/dx/CustomTextRenderer.cpp` (+1 -1) 📝 `src/renderer/dx/CustomTextRenderer.h` (+4 -4) </details> ### 📄 Description * [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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:17:35 +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#26692