microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.7k stars 6.52k forks source link

[fz] override list to allow quirky programs to resize #15215

Open TheSimArchitect opened 2 years ago

TheSimArchitect commented 2 years ago

Description of the new feature / enhancement

I really love PowerToys and the Fancy Zones are definitely a must and I still wonder why it's not included in the main operating system by default.

Anyways, it would be nice if the fancy zones worked with older applications (like EZVIZ program, for example, that looks like something from the times of Windows Vista 😝) and fixed size windows (even if it only moves to the nearest corner of a chosen zone or to its center, depending on the location of the mouse pointer).

Scenario when this would be used?

To move/resize windows that aren't actually manipulatable using Fancy Zones

Supporting information

EZVIZ has an application that looks like it comes from Windows Vista and is one example.

TD Ameritrade's "Think or Swim" also isn't resizable/movable using Fancy Zones, as well other similar applications.

Windows with fixed sizes like dialogs could benefit from the possibility of moving them to the nearest corner or center of a zone.

Jay-o-Way commented 2 years ago

Actually, recently there was a change (#14222) to explicitly exclude child windows from FancyZones. Not sure if it's possible to resize windows that don't allow resizing (some also have a minimum width or height) but I suppose snapping to a corner should be possible in most cases. @SeraphimaZ would be able to answer in more detail.

crutkas commented 2 years ago

All dependent on what the application claims they are. If an app says they are modal, maybe the dev did something special for a reason. We don't have deep knowledge of the app, just they are this window type and our rules engine then does its job. We create a generic solution and massive rippling effects to this happen when we override. Also some apps don't allow resizing. We use an OS call that says put window in this spot at this size. If the app says no, not much we can do as well. Example some apps have min sizes, we can't override that.

Maybe an override / exception list would be the way to do this but this type of behavior then gets additionally hard to test / get our hands on.

fyi, you're also the second person to bring up Ameritrade's app. #4937 and #13985 both reference it

crutkas commented 2 years ago

My thinking is i see a high cost to implement and support here and it makes me think we can be of greater good on other things

TheSimArchitect commented 2 years ago

Maybe we could just have a selector on Fancy Zones settings to "override fixed window sizes"?

Also, modal windows might not be resized, but you could reposition them to the nearest corner of the zone or the center of the zone depending where we are with the mouse. Or, if difficult to implement, maybe just position at the top left corner of the zone. That could also be used for other windows that aren't manageable like EZVIZ application, for example. Just being able to snap those windows would be fantastic, resizing them would just be a "cherry on the cake". 🙏🏻

Thanks for getting back, nonetheless! 🤗

Happy New Year!! 🥂

TheSimArchitect commented 2 years ago

I don't know if it helps but EZVIZ categorizes its window as belonging to the QWidget class. Would it be possible to allow fancy zones to act upon those? Think or Swim from Ameritrade is a SunAwtFrame. It would be awesome if we had an advanced setting to enable Fancy Zones for "unsupported windows" even if at "our own risk" 😉

This is just a suggestion, of course. I am thankful either way, your tool makes my work much easier even as it is and I'll use "AutoSizer" for those issues until I can use fancy zones as a temporary partial fix.