microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.64k stars 6.57k forks source link

Trigger FancyZone for windows that are dragged not by the TitleBar. #4679

Open MikeKholomeev opened 4 years ago

MikeKholomeev commented 4 years ago

Summary of the new feature/enhancement

I have the script at my PC, written on AutoHotkey, which allows me to Move Windows using Any It Parts. This functionality mapped to Middle Mouse Button. FancyZone feature works only if I drag window by TitleBar. It would be nice if we could make it work with any dragged window. Not sure if it possible at all, but may be you have some ideas.

enricogior commented 4 years ago

@MikeKholomeev FancyZones needs to detect the difference between a window being moved or being resized. I assume that when you move a window using the AutoHotkey script, FZ doesn't detect it as a move and assumes it's a resize or doesn't even receive the event in the first place. We may look into it, but not any time soon.

Korkman commented 8 months ago

Dropping an idea here how it could work. FancyZones should NOT attempt to detect and interpret window movements from AutoHotkey in general, as scripted window movements can have varying intentions. But it could offer some kind of API for AutoHotkey and others to consume, so an application can signal a few things:

That way AutoHotkey users can script the behavior as they like. I think this would be the minimum effort required and have the most impact.