microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.83k stars 6.47k forks source link

[FancyZones] Applications that don't activate/can't be dragged to a zones [issue tracker] #1466

Closed enricogior closed 3 years ago

enricogior commented 4 years ago

Please see https://github.com/microsoft/PowerToys/wiki/Application-Compatibility

ivenhov commented 4 years ago

Hyper-V Manager Notepad++

enricogior commented 4 years ago

@ivenhov thanks for reporting the apps. Regarding Notepad++, I used it daily and I never had any problem with it. In your case the problem happens with SHIFT-drag or even if the SHIFT requirement is turned off?

ivenhov commented 4 years ago

Hi I have SHIFT option enabled and there is no snapping. With SHIFT option off snap area appears, it becomes blue when dragging Notepad++ into it, but dropping the window does not snap it

I'm on Notepad++ 7.8.4 in case it matters. Windows Version 10.0.18363 Build 18363

enricogior commented 4 years ago

Not sure it makes any difference, but just to verify:

It's indicated in the "About Notepad++" dialog

image

ivenhov commented 4 years ago

It is a 64-bit version, installed (not portable) but I think it was installed with chocolatey.

patrick-reyes commented 4 years ago

After installing v0.15.1 I encountered the same issue with Visual Studio not snapping to a zone. In general settings I changed the "Always run as administrator" to On and that fixed the issue for me. I then tried turning the option back off to see what the behaviour would be and surprisingly the zone snapping still worked.

Are there some settings that require admin privileges to be set which could be missed on install?

Windows 10 Pro 1909 PowerToysSetup-0.15.1-x64.msi

crutkas commented 4 years ago

@PatReyesAU are you running VS as administrator?

patrick-reyes commented 4 years ago

@crutkas Yes I am

crutkas commented 4 years ago

That is why. An non elevated process can not resize / move an elevated process. We have a work item to detect this scenario and prompt you

crutkas commented 4 years ago

1015 is the tracking issue for that

patrick-reyes commented 4 years ago

@crutkas Ah that makes sense. Thank you for the info!

enricogior commented 4 years ago

@PatReyesAU

I then tried turning the option back off to see what the behaviour would be and surprisingly the zone snapping still worked.

The option will have effect after you restart PowerToys, if you didn't restart it that explains why you were still able to drag the VS window.

ivenhov commented 4 years ago

Hi Thanks for pointing that out. It turned out @PatReyesAU and @crutkas In my case Notepad++ was running in Administrator mode as I was editing hosts file at some point. With Notepadd++ it is very easy to go into Administrator's mode so It was left as that for some time. I've checked and re-launching it in normal mode fixes the problem I'm assuming Hyper-V Manager will be the same, although I'm not launching it as Administrator I did not know elevated mode may matter. Since there is #1015 I would consider my problem as a duplicate.

The-Randalorian commented 4 years ago

IDLE (Python IDE) also appears to be affected. This is in python version 3.8.0, 64-bit.

Other tkinter based applications seem to be affected similarly. (Perhaps this extends to tcl/tk based GUIs in other languages?)

Other python GUI systems may not be affected. I personally tested pygame(sdl2) with no issues.

MichaelPeter commented 4 years ago

I found another issue not shure if I should open a seperate Issue.

I just updated power toys using the MSIX Installier to 15.2.

If I start Visual Studio 2019 Preview normally I can drag the window. If I start Visual Studio 2019 Preview with Admin rights I cannot drag the Visual Studio window.

I need to start it with AdminRights otherwise I cannot build my Xamarin UWP App.

crutkas commented 4 years ago

A non admin process cannot do many things to admin processes. When PowerToys isn’t run as admin and you are running something else as, we cannot move / resize it. Issue #1015 is designed to notify users when we see this scenario and let you decide what to do.

ChrisRichner commented 4 years ago

Tested with PowerToys v0.15.2 and Visual Studio Version 16.6.0 Preview 1.0 running with non-admin rights on a Windows 1909 Build (18363.720).

The Tool Window Test Explorer does not activate the drop zones.

crutkas commented 4 years ago

Tested with PowerToys v0.15.2 and Visual Studio Version 16.6.0 Preview 1.0 running with non-admin rights on a Windows 1909 Build (18363.720).

The Tool Window Test Explorer does not activate the drop zones.

@enricogior tool windows do activate aero snaps.

enricogior commented 4 years ago

@crutkas supporting tool windows is very tricky, the current code tries to figure out if a window can be snapped based on certain properties and the VS tool windows are currently not supported.

ChrisRichner commented 4 years ago

I see, maybe it helps to know that this used to work in a previous version of Powertoys and Visual Studio.

enricogior commented 4 years ago

@ChrisRichner there has been several changes since the first release, in some cases adding support for some windows/dialogs caused regressions for other applications. The work is still in progress, so we may be able the support VS tool windows at some point. There is also the problem that some tool windows should not be resized, while in other cases the desired behavior is to resize them, that distinction is not yet implemented.

verglor commented 4 years ago

supporting tool windows is very tricky, the current code tries to figure out if a window can be snapped based on certain properties

Is it possible to add such option that any window regardless of it's properties will be snappable with shift key ?

enricogior commented 4 years ago

Is it possible to add such option that any window regardless of it's properties will be snappable with shift key ?

Given the current implementation of FancyZones, it would break the "move windows to their last known zone" feature. It's something we may try to fix in a future release.

crutkas commented 4 years ago

@verglor, as @enricogior commented, it gets tricky with that feature as there are a LOT of ways to create a window. What started to happen was the save dialog then would grow when it was unintentional side-effect.

stuffIsHard :)

dudeofawesome commented 4 years ago

The Origin game launcher fails to be detected for snapping as well. I believe it's a QT program.

The UPlay game launcher doesn't work either.

Sinux75 commented 4 years ago

Teamspeak 3 won't snap for me.

gendelo3 commented 4 years ago

Teamspeak 3 won't snap for me.

For me it works, but only when running PowerToys as admin

crutkas commented 4 years ago

Are you running it as admin?

gendelo3 commented 4 years ago

Are you running it as admin?

No, I do not run the ts3 client as admin.

crutkas commented 4 years ago

@dudeofawesome was this tested under 0.16?

crutkas commented 4 years ago

@gendelo3 was this tested under 0.16?

dudeofawesome commented 4 years ago

@crutkas

Running v0.16.1

gendelo3 commented 4 years ago

@gendelo3 was this tested under 0.16?

yeah, i got 0.16.1 installed.

crutkas commented 4 years ago

@gendelo3 do other apps snap? @dudeofawesome said it works for me so trying eliminate what may be happening.

Anything else like another window snapping app like Dell's or AMD's running?

gendelo3 commented 4 years ago

Everything else I've tried so far does snap, Chrome/ Spotify etc. work flawlessly. My windows install is pretty fresh because I got a new Ryzen 3700X, but I don't know of any window snapping apps installed (graphics card is from Nvidia if that matters, the only AMD software installed should be mainboard/chipset drivers). Windows built-in snapping works fine.

enricogior commented 4 years ago

@genbod @crutkas I can confirm that TeamSpeak 3 has a weird behavior, it does actually run elevated even if FZ fails to detect that is does:

image

But after restarting the app to check if the UAC prompt appears, it seems to run non-elevated:

image

But it behaves exactly as if it was running elevated.

We should add TeamSpeak 3 to the list of problematic apps that require FZ to run elevated.

crutkas commented 4 years ago

@genbod we're finding some things act up depending on what may be installed on the machine. We take all compatibility issues very seriously.

crutkas commented 4 years ago

@enricogior is there a tracking item to detect problemmatic apps and warn user just like we did with elevated apps?

enricogior commented 4 years ago

@crutkas not a dedicated one yet, I've added sections in the first comment of this issue.

Antaris commented 4 years ago

Since updating to 0.16.0 (and 0.16.1), Visual Studio 2019 itself will not work with FancyZones. SSMS does, which is based on an early VS shell, but VS2019 does not :-(

PowerToys: since 0.16.0 Windows: 10.0.19041.153 VS2019: 16.4.2

enricogior commented 4 years ago

@Antaris are you running VS as administrator? In that case you also need to run PowerToys as an administrator. If not, there is something else going on in your configuration since Visual Studio 2019 works as expected with FancyZones.

Antaris commented 4 years ago

I am not running as an administrator. I haven't changed my configuration between 0.15.0 -> 0.16.1

enricogior commented 4 years ago

@Antaris all other apps that you tried work as expected and only VS doesn't work? It doesn't activate the zones or it does snap to a zone when selected?

Antaris commented 4 years ago

It does not activate the zones at all. I haven't found any other app that does not work

enricogior commented 4 years ago

@Antaris please open a new issue since it's not a general issue with Visual Studio, we will continue the investigation there, thank you.

Cephel commented 4 years ago

I found that moving Teamspeak via fancy zones did work before I updated PowerToys to 0.16.1, was on 0.14.1 before I believe.

mousebyte commented 4 years ago

I'd like to add that it's not just the Visual Studio Solution Explorer window, but in fact any secondary window created with visual studio that seems to have this issue. I have a secondary window composed of a few different tool windows and it can't be dragged into zones, while the main window seems to work just fine. Here's a screenshot of the type of window I'm using. The option to override Windows Snap hotkeys also does not work - they default to the standard behavior when I use them with this window focused. https://user-images.githubusercontent.com/17837620/79714951-4dced400-82a0-11ea-95c4-c8c3efb68296.png

Chimeray commented 4 years ago

Hello. I'd like to report another program that doesn't work with FancyZones since the v14 update (v12 and v13 works fine). It's our inhouse gaming engine that is built on WPF, so a part of .Net. I'm not a programmer so I don't know much more I'm afraid, that's the info I got from our engineers. Is that enough? Anything specific I should ask that could help you out? The main window works fine, but not any extra windows.

enricogior commented 4 years ago

Hi @Chimeray at present it's by default that child windows are not zonable. So at present there is nothing wrong with your app, it's just us that we need to add the feature.

Chimeray commented 4 years ago

Aah ok, didn't know! I'll stay on v13 for now and keep a look out for when that feature is implemented then. Thx!