Skip to content

Disable tab drag drop when running as a different user - #20798

Open
Clint Dovholuk (dovholuknf) wants to merge 2 commits into
microsoft:mainfrom
dovholuknf:tab-dragdrop-runas
Open

Clint Dovholuk (dovholuknf) wants to merge 2 commits into
microsoft:mainfrom
dovholuknf:tab-dragdrop-runas

Conversation

@dovholuknf

@dovholuknf Clint Dovholuk (dovholuknf) commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

disable drag/drop/tear when running as other users

Summary of the Pull Request

  • disables drag drop for /runas instances, similar to elevated instances
  • reflects "setting cannot be changed" if running as different user or elevated

References and Relevant Issues

#15689
depends on #20394 many of the changes here are also on that PR. I can't "stack" from my fork here

Detailed Description of the Pull Request / Additional comments

When running wt.exe as a different user, it's super easy to try to move the window but instead grab a tab and
drag... However when you do that, wt.exe crashes taking down not just the tab but all windows and all tabs with
it. That is super frustrating. This PR disables drag/drop entirely for '/runas' users. the "move tab left/right"
still work

#20394 (comment) - wtsapi32.lib is now linked by every project (via src/common.build.post.props) as of this PR because I know of no better way to do it yet.

Validation Steps Performed

  • demonstrated crash (see end of PR)
  • ran as "claude" and "admin" to verify user cannot drag/drop/tear tabs

PR Checklist

REPRODUCTION
repro

FIX/ENHANCEMENT DEMONSTRATED
fixed

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news. labels Oct 13, 2026
@dovholuknf
Clint Dovholuk (dovholuknf) marked this pull request as ready for review October 13, 2026 12:56
Comment thread src/types/utils.cpp Fixed
@github-actions

This comment has been minimized.

@DHowett

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@DHowett

Copy link
Copy Markdown
Member

I know this one is stacked on the other one, but we may as well try to run the CI for the combination ;P

@dovholuknf

Copy link
Copy Markdown
Contributor Author

I know this one is stacked on the other one, but we may as well try to run the CI for the combination ;P

other pr was green, this pr had analysis failures. I pushed a new commit faab979 to add suppressions but I don't know if you want that or something else?

@dovholuknf

Copy link
Copy Markdown
Contributor Author

Dustin L. Howett (@DHowett) sorry but i'm gonna bump you on this just cause you were looking at it and i'd love to close these two prs out...

@DHowett

Copy link
Copy Markdown
Member

this one will need a rebase, probably! I may also have some work to do on the sources files because we've added a new dependency to the shared components that also build inside windows. I'll have to think about this a bit...

@dovholuknf

Copy link
Copy Markdown
Contributor Author

this one will need a rebase, probably! I may also have some work to do on the sources files because we've added a new dependency to the shared components that also build inside windows. I'll have to think about this a bit...

one rebase coming right up while you contemplate :D

@dovholuknf

Copy link
Copy Markdown
Contributor Author

rebase complete

@dovholuknf

Copy link
Copy Markdown
Contributor Author

Dustin L. Howett (@DHowett) - checking back in on this. :) cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Terminal crashes when dragging a tab

3 participants