[PR #14946] [MERGED] Clearly differentiate running elevated vs. drag/drop breaking #30319

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14946
Author: @zadjii-msft
Created: 3/3/2023
Status: Merged
Merged: 3/17/2023
Merged by: @DHowett

Base: mainHead: dev/migrie/b/13928-can-drag-drop


📝 Commits (7)

  • 99c9ab6 Clearly differentiate between running elevated and being able to drag/drop
  • a3964a2 Ah so apparently only BODGY is allowed. If it's only a wee bit bodgy then it's not fine. Fine, fine.
  • b0dc3f1 Merge remote-tracking branch 'origin/main' into dev/migrie/b/13928-can-drag-drop
  • 6443ed1 notes from review - this really makes the code a lot more legible
  • 0fbb7b3 Merge remote-tracking branch 'origin/main' into dev/migrie/b/13928-can-drag-drop
  • 8f77f7d sure fine whatever
  • 1495151 Merge remote-tracking branch 'origin/main' into dev/migrie/b/13928-can-drag-drop

📊 Changes

11 files changed (+84 additions, -72 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppLogic.cpp (+11 -2)
📝 src/cascadia/TerminalApp/AppLogic.h (+3 -1)
📝 src/cascadia/TerminalApp/AppLogic.idl (+2 -1)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+27 -28)
📝 src/cascadia/TerminalApp/TerminalPage.h (+2 -1)
📝 src/cascadia/TerminalApp/TerminalWindow.cpp (+0 -29)
📝 src/cascadia/TerminalApp/TerminalWindow.h (+0 -1)
📝 src/cascadia/TerminalApp/TerminalWindow.idl (+0 -2)
📝 src/cascadia/TerminalSettingsModel/ApplicationState.cpp (+4 -4)
📝 src/types/inc/utils.hpp (+2 -1)
📝 src/types/utils.cpp (+33 -2)

📄 Description

Credit where credit is due - @jboelter did literally all the hard work.

I just separated this out to two elements:

  • Are we running elevated?
  • Can we drag drop?

As we learned in #7754, the builtin administrator can drag drop. But critically, they are also running as admin! The way we had this logic before, we're treat them as unelevated, because we had been overloading the meaning here.

This splits these into two separate functions. Comes with the added benefit of re-adding the elevation shield to the Terminal window for users with UAC disabled (which was missing before) (and can still be disabled).

Closes #13928

Tested on a Win10 VM with EnableLua=0


🔄 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/14946 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 3/3/2023 **Status:** ✅ Merged **Merged:** 3/17/2023 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/migrie/b/13928-can-drag-drop` --- ### 📝 Commits (7) - [`99c9ab6`](https://github.com/microsoft/terminal/commit/99c9ab6dde3c96cfeef2f1a6ce846673dfc36378) Clearly differentiate between running elevated and being able to drag/drop - [`a3964a2`](https://github.com/microsoft/terminal/commit/a3964a2a669c4f0ee8688cdc77e069f4c7cc08c8) Ah so apparently only BODGY is allowed. If it's only a wee bit bodgy then it's not fine. Fine, fine. - [`b0dc3f1`](https://github.com/microsoft/terminal/commit/b0dc3f12344ff8eb22dc5b5cd7252e348c358d9c) Merge remote-tracking branch 'origin/main' into dev/migrie/b/13928-can-drag-drop - [`6443ed1`](https://github.com/microsoft/terminal/commit/6443ed1db59af08a4319e7807203279bd01b5707) notes from review - this really makes the code a lot more legible - [`0fbb7b3`](https://github.com/microsoft/terminal/commit/0fbb7b372f497e7a2e4f06e3eb36b09a3e8668dd) Merge remote-tracking branch 'origin/main' into dev/migrie/b/13928-can-drag-drop - [`8f77f7d`](https://github.com/microsoft/terminal/commit/8f77f7d3a0de394b90dd9e4c4ae1d9eb25abe3be) sure fine whatever - [`1495151`](https://github.com/microsoft/terminal/commit/149515155dd56efca81704f023f277cc11b9b2e5) Merge remote-tracking branch 'origin/main' into dev/migrie/b/13928-can-drag-drop ### 📊 Changes **11 files changed** (+84 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+11 -2) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+3 -1) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+2 -1) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+27 -28) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+2 -1) 📝 `src/cascadia/TerminalApp/TerminalWindow.cpp` (+0 -29) 📝 `src/cascadia/TerminalApp/TerminalWindow.h` (+0 -1) 📝 `src/cascadia/TerminalApp/TerminalWindow.idl` (+0 -2) 📝 `src/cascadia/TerminalSettingsModel/ApplicationState.cpp` (+4 -4) 📝 `src/types/inc/utils.hpp` (+2 -1) 📝 `src/types/utils.cpp` (+33 -2) </details> ### 📄 Description Credit where credit is due - @jboelter did literally all the hard work. I just separated this out to two elements: * Are we running elevated? * Can we drag drop? As we learned in #7754, the builtin administrator _can_ drag drop. But critically, they are also running as admin! The way we had this logic before, we're treat them as unelevated, because we had been overloading the meaning here. This splits these into two separate functions. Comes with the added benefit of re-adding the elevation shield to the Terminal window for users with UAC disabled (which was missing before) (and can _still_ be disabled). Closes #13928 Tested on a Win10 VM with `EnableLua=0` --- <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:40:05 +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#30319