close
Skip to content

Add window positioning and sizing with Alt+mouse button#47024

Merged
yeelam-gordon merged 47 commits into
mainfrom
yeelam/grab-and-move
Apr 15, 2026
Merged

Add window positioning and sizing with Alt+mouse button#47024
yeelam-gordon merged 47 commits into
mainfrom
yeelam/grab-and-move

Conversation

@yeelam-gordon

Copy link
Copy Markdown
Contributor

Re-creation of #46817 from an internal branch to work around stale code-scanning merge protection.

Original PR

See #46817 for full context, discussion, and review history.

Summary

This adds a new toy, GrabAndMove (previously WinPos), that allows dragging (left click) or resizing (right click) of windows while the Alt key is pressed.

Closes: #269

PR Checklist

  • Communication: discussed with core contributors
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated

foxmsft and others added 17 commits April 10, 2026 13:41
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Alt absorption is sufficiently handled with ReplayAbsorbedAlt
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… remove v142 toolset

- Fix thread-safety bug: protect g_excludedApps with mutex (settings thread
  writes while hook callbacks read concurrently)
- Add GRABANDMOVE_EXIT_EVENT so disable() signals the exe to exit gracefully
  instead of relying solely on TerminateProcess after 1.5s timeout
- Embed GrabAndMove.manifest (PerMonitorV2 DPI awareness) into the exe via
  vcxproj Manifest item - fixes wrong coordinates on mixed-DPI setups
- Remove hardcoded PlatformToolset v142 from both vcxproj files; inherit
  v143/v145 from repo-wide Cpp.Build.props
- Fix FILETYPE VFT_DLL -> VFT_APP in GrabAndMove.rc (exe, not dll)
- Remove dead locals in EndInteraction
- Fix copy-paste comment in resource.h (CropAndLock.rc -> GrabAndMove.rc)
- Add missing <mutex> and <vector> includes to pch.h
@yeelam-gordon yeelam-gordon requested a review from a team as a code owner April 15, 2026 06:14
@yeelam-gordon yeelam-gordon enabled auto-merge (squash) April 15, 2026 07:13
@yeelam-gordon yeelam-gordon merged commit e4f9889 into main Apr 15, 2026
20 checks passed
@LegendaryBlair LegendaryBlair added this to the PowerToys 0.99 milestone Apr 15, 2026
@LegendaryBlair LegendaryBlair added the Product-Window Manager Refers to the idea of a Window Manager PowerToy label Apr 16, 2026
@crutkas crutkas deleted the yeelam/grab-and-move branch May 25, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.99 Product-Window Manager Refers to the idea of a Window Manager PowerToy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alt+Drag or Windows+Drag to move windows

5 participants