[PR #929] [MERGED] Apply a GDI region to the top level Island window to allow dragging with a single Xaml Island #24402

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/929
Author: @ocalvo
Created: 5/21/2019
Status: Merged
Merged: 6/25/2019
Merged by: @DHowett-MSFT

Base: masterHead: master


📝 Commits (10+)

  • 2c7e4e8 Use a region to cut off the dragable region
  • d1af4bd It works
  • 7b34187 Adjust Slipt button for Title Bar
  • 80c6b93 Use proper measurements for the draggable area
  • d56afcf Remove dead code
  • 567a833 Update src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp
  • dc8213c Update src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp
  • 6a7ea45 Apply PR feedback
  • fab0bc8 Apply PR feedback
  • 0d34b8f Fix build break ARM64

📊 Changes

33 files changed (+479 additions, -634 deletions)

View changed files

📝 OpenConsole.sln (+2 -23)
src/cascadia/Microsoft.UI.Xaml.Markup/Microsoft.UI.Xaml.Markup.def (+0 -3)
src/cascadia/Microsoft.UI.Xaml.Markup/Microsoft.UI.Xaml.Markup.vcxproj (+0 -68)
src/cascadia/Microsoft.UI.Xaml.Markup/ReadMe.md (+0 -22)
src/cascadia/Microsoft.UI.Xaml.Markup/XamlApplication.cpp (+0 -130)
src/cascadia/Microsoft.UI.Xaml.Markup/XamlApplication.h (+0 -46)
src/cascadia/Microsoft.UI.Xaml.Markup/XamlApplication.idl (+0 -17)
src/cascadia/Microsoft.UI.Xaml.Markup/packages.config (+0 -4)
src/cascadia/Microsoft.UI.Xaml.Markup/pch.cpp (+0 -4)
src/cascadia/Microsoft.UI.Xaml.Markup/pch.h (+0 -21)
src/cascadia/TerminalApp/App.base.h (+40 -0)
📝 src/cascadia/TerminalApp/App.cpp (+31 -16)
📝 src/cascadia/TerminalApp/App.h (+9 -9)
📝 src/cascadia/TerminalApp/App.idl (+3 -8)
📝 src/cascadia/TerminalApp/App.xaml (+5 -5)
src/cascadia/TerminalApp/MinMaxCloseControl.cpp (+58 -0)
src/cascadia/TerminalApp/MinMaxCloseControl.h (+34 -0)
src/cascadia/TerminalApp/MinMaxCloseControl.idl (+11 -0)
src/cascadia/TerminalApp/MinMaxCloseControl.xaml (+21 -0)
📝 src/cascadia/TerminalApp/TerminalApp.vcxproj (+22 -18)

...and 13 more files

📄 Description

Summary of the Pull Request

When Terminal is drawing in the non client area we no longer create 2 islands. Instead we create a single island and create a region that "pokes" the drag-able title bar area in the top right corner of the main window of terminal.

Capture

This change also fixes:

  • A crash at shutdown where the Application object is released early.
  • DestroyWindow is not getting called at shutdown for the all HWND (This have the effect of showing the window for a brief period after closing the app)
  • WindowsDesktopXamlSource.Close was not getting called at shutdown.

References

PR Checklist

  • Closes 872, 1085
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments


🔄 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/929 **Author:** [@ocalvo](https://github.com/ocalvo) **Created:** 5/21/2019 **Status:** ✅ Merged **Merged:** 6/25/2019 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`2c7e4e8`](https://github.com/microsoft/terminal/commit/2c7e4e820f37993b4dd086f8a4caa43d56cc9107) Use a region to cut off the dragable region - [`d1af4bd`](https://github.com/microsoft/terminal/commit/d1af4bdee6ba073c28f98bad5986fb3c9d6fb9e6) It works - [`7b34187`](https://github.com/microsoft/terminal/commit/7b34187e0cea2cf22c3bc92b624b4f7633fd26cd) Adjust Slipt button for Title Bar - [`80c6b93`](https://github.com/microsoft/terminal/commit/80c6b93fbd8ced87ff5c68a719d587f989fad21a) Use proper measurements for the draggable area - [`d56afcf`](https://github.com/microsoft/terminal/commit/d56afcfc81ec58b81dbcffd8d3ea0c4b6cd80487) Remove dead code - [`567a833`](https://github.com/microsoft/terminal/commit/567a8335fc4f14e2fa7400c6d0a8a34453f8a9e5) Update src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp - [`dc8213c`](https://github.com/microsoft/terminal/commit/dc8213cd2870c17836fbd977193cdda20d8ca779) Update src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp - [`6a7ea45`](https://github.com/microsoft/terminal/commit/6a7ea45d83f55b113c970e6adee1bcf2cf92ecd2) Apply PR feedback - [`fab0bc8`](https://github.com/microsoft/terminal/commit/fab0bc81e618cac9d107af601e90998397be584c) Apply PR feedback - [`0d34b8f`](https://github.com/microsoft/terminal/commit/0d34b8f7fece1e654b45fbf536be530b302dd976) Fix build break ARM64 ### 📊 Changes **33 files changed** (+479 additions, -634 deletions) <details> <summary>View changed files</summary> 📝 `OpenConsole.sln` (+2 -23) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/Microsoft.UI.Xaml.Markup.def` (+0 -3) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/Microsoft.UI.Xaml.Markup.vcxproj` (+0 -68) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/ReadMe.md` (+0 -22) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/XamlApplication.cpp` (+0 -130) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/XamlApplication.h` (+0 -46) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/XamlApplication.idl` (+0 -17) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/packages.config` (+0 -4) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/pch.cpp` (+0 -4) ➖ `src/cascadia/Microsoft.UI.Xaml.Markup/pch.h` (+0 -21) ➕ `src/cascadia/TerminalApp/App.base.h` (+40 -0) 📝 `src/cascadia/TerminalApp/App.cpp` (+31 -16) 📝 `src/cascadia/TerminalApp/App.h` (+9 -9) 📝 `src/cascadia/TerminalApp/App.idl` (+3 -8) 📝 `src/cascadia/TerminalApp/App.xaml` (+5 -5) ➕ `src/cascadia/TerminalApp/MinMaxCloseControl.cpp` (+58 -0) ➕ `src/cascadia/TerminalApp/MinMaxCloseControl.h` (+34 -0) ➕ `src/cascadia/TerminalApp/MinMaxCloseControl.idl` (+11 -0) ➕ `src/cascadia/TerminalApp/MinMaxCloseControl.xaml` (+21 -0) 📝 `src/cascadia/TerminalApp/TerminalApp.vcxproj` (+22 -18) _...and 13 more files_ </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request When Terminal is drawing in the non client area we no longer create 2 islands. Instead we create a single island and create a region that "pokes" the drag-able title bar area in the top right corner of the main window of terminal. <img width="644" alt="Capture" src="https://user-images.githubusercontent.com/2091582/59122609-0b163e80-8910-11e9-8abf-c1fb67a6cbab.PNG"> This change also fixes: - A crash at shutdown where the Application object is released early. - DestroyWindow is not getting called at shutdown for the all HWND (This have the effect of showing the window for a brief period after closing the app) - WindowsDesktopXamlSource.Close was not getting called at shutdown. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] Closes [872](https://github.com/microsoft/terminal/issues/872), [1085](https://github.com/microsoft/terminal/issues/1085) * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [X] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments --- <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:03:06 +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#24402