-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alt+Drag or Windows+Drag to move windows #269
Comments
Alt+Drag would be nice, but also Alt+Resize would be just as helpful. Especially if the window snaps to borders. |
Alt+Drag and Alt+Resize with snapping is my dream for windows management on Windows system. |
Thanks for suggesting this @mattroyal. I am ok with AltDrag being used as a reference. Maybe when it is done and AltDrag becomes somewhat obsolete, then maybe Microsoft can send me a donation. Or at least buy me lunch (I live in Seattle now). 😉 |
@stefansundin |
@stefansundin |
I’ve decided to take a stab at this PowerToy. |
Hi @loligans |
Yeah I've been utilizing the fancyzones project as a frame of reference. They share very similar functionality, so it's made it easier to get started. It's open for discussion, but for an initial version here are the settings that can be modified. enum class Action
{
/* No action will be performed. */
Nothing,
/* Move a window. */
Move,
/* Resizes a window. */
Resize,
/* Minimize a window. */
Minimize,
/* Lower the window. */
Lower,
/* Make a window topmost. */
AlwaysOnTop,
/* Center a window on the screen. */
Center,
/* Close a window. */
Close
};
/*Whether the window should be focused while dragging*/
bool focusWindowWhenDragging = false;
/*Middle clicking the title bar sends it to the back*/
bool lowerWindowByMiddleClickingTitleBar = false;
/*Snap to monitor borders*/
bool snapToScreenBorders = false;
/*Snap to borders of other windows*/
bool snapToOutsideOtherWindows = false;
/*Left mouse button action*/
Action leftMouseButton = Action::Nothing;
/*Middle mouse button action*/
Action middleMouseButton = Action::Nothing;
/*Right mouse button action*/
Action rightMouseButton = Action::Nothing;
/*Hotkey to activate the module. Defaults to ALT*/
PowerToysSettings::HotkeyObject activationHotkey = PowerToysSettings::HotkeyObject::from_settings(false, false, true, false, VK_MENU, L""); |
Hi @loligans |
Yeah that's fine. @enricogior Is there a way I can reference the branch I'm working on in this github issue? That way I can get feedback from the other engineers on this feature. |
Hi @loligans |
Here is the working branch from the forked repo: https://github.com/loligans/PowerToys/tree/dev/loligans/altdrag |
Just wanted to document this here: I added a low level mouse hook since I'll need to process mouse position while the module The implementation is nearly identical to the keyboard hook we have set up already. Because the mouse will be sending in a flood of events compared to the keyboard, we'll likely want to minimize the amount of processing done on the hook. For now I'm gonna do everything on the hook and measure if we are well below the If we're reaching close to the Thoughts? @enricogior |
Hi @loligans |
while this could be associated with FancyZones, i think they are distinct different asks. I think we should track work that spans both and understand it may be the same/shared engine under the hood but i don't think we should merge the two as a holistic entity. |
Status on this? |
This is not something we are currently planning for a v1. Great idea and if a community member wants to partner with us, happy to merge it in sooner. It is a great idea |
I've tested this script, if anyone has mutiple monitors with different resolution/scale configuration, it's buggy. Although altsnap has some bugs. But it performance much better than ahk on my machine. I recommend just using altsnap. |
Curious how these compare to KDE Mover-Sizer Been using it for over a year now and feels like the behavior I'm getting on Linux, and is important that it allows me to use the Windows key instead of Alt (which would kill me due to use in 3D applications) |
Wow, this one is great, it has less bug than altsnap. (For me, there is a bug when using windows key on Emacs. When Emacs is focused, I can't move Emacs window with windows key. This bug also arises on altsnap) altsnap has a bug when I move window from one monitor to another. Some window will be extremely large when crossing monitors (compared to drag title bar) KDE Mover-Sizer lacks some functionally that altsnap provided e.g. double click to maximize window, drag to top to maximize (Aero snap) Also, altsnap support left windows key to drag/resize. |
The drag to top to maximize would be nice, but it does have the ability to maximize / restore via hotkey + MMB. Good to know that altsnap has the ability to use the Windows key instead of Alt. Will keep it on the list, in case KDE Mover-Sizer starts acting funny. |
Is someone here among the developers who can push this topic at Microsoft? To me it seems even better if this functionality would be implemented directly into the OS. After all, the OS is called 'Windows'. So managing windows efficiently should be a core functionality. |
I didn't find anything I liked, so me and a friend created an AHK Script that does this. It also changes the cursor to make it easier to understand what's happening (like in kde). It is by far the least janky one I've found, and it supports multiple monitors, resizing, moving, maximizing/restoring, minimizing, transparency (like in kde with scroll wheel), fullscreen applications (not all though). I also had issues with some scripts due to me having hover-focus enabled in windows, but this script works fine with that too. You can check it out here if you want: https://github.com/IsacEkeroth/ahk-resize-windows |
I created a wpf application that can move window in window anywhere by alt + left mouse drag and resize window in window by alt + right mouse drag You can check it out here if you want: https://github.com/zoo-3d/D-R/blob/main/README.en.md |
Oh wow so you put a close source app on github... |
Hopefully we possibly get this in 2024 :)
…On Wed, Feb 21, 2024 at 11:00 PM koleq ***@***.***> wrote:
Oh wow so you put a close source app on github...
People in this thread are not looking for an app that can do Alt/Win Drag,
(people would just use AltSnap on Windows, not your close source nonsense)
What we want here is for this to be a part of powertoys.
—
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABY5UZDF3CDNHH2UO6JZRJTYU3NILAVCNFSM4IUMB52KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVHA3TMMBSG4YQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Really hoping this is coming soon! |
👀 we are still here. I'm using https://github.com/stefansundin/altdrag since I started using Windows, but I really miss a similar feature in PowerToys. |
+1 It would totally make sense to have this feature supplied by PowerToys though! |
Altsnap is flagged byAV tho |
would be great if powertoys implement this altdrag functions: send back window to back |
this is the feature I'm missing the most from PowerToys.
exactly as possible in most linux desktop environments is status on this still |
It's been a long time since this topic was opened. Many users want this feature. Why doesn't anyone hear our voice? |
I would love to see this feature. |
I need this in my life. |
I had some issues with AHK being blocked in some game anti cheats and felt that it was a bit slow, so I rewrote it in C++ and made it a bit easier to get it up and running: https://github.com/alvesvaren/resizer2, just if anyone still wants a workaround. It's a bit less customizable right now though |
Summary of the new feature/enhancement
Moving windows using the mouse relies on hitting a small target, especially on high-resolution screens. Add an option to move entire windows by alt-dragging or windows-dragging them, anywhere on the window except perhaps the resize area.
Proposed technical implementation details
Stefan Sundin has done great work on AltDrag: https://stefansundin.github.io/altdrag/ . With permission, I'd use this as an initial reference.
Alt+Drag or Windows+Drag could be implemented as part of FancyZones, activated with a toggle.
The text was updated successfully, but these errors were encountered: