PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

FancyZones can break Unity sometimes

Open aybe opened this issue 4 years ago • 29 comments

Environment

Windows build number: 10.0.19041.329
PowerToys version: 0.18.2
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Unity 2020.2.0a13.1691

Drag Unity window to a fancy zone, sometimes it'll work, sometimes not.

Expected behavior

This should always work just as Windows snapping does.

Actual behavior

Program window is corrupted, impossible to recover, program has to be restarted.

Screenshots

Unity_2020-06-21_21-54-54

aybe avatar Jun 23 '20 19:06 aybe

@aybe if you use the Windows 10 Snap feature, does it work fine with Unity or does it also cause the same problem?

enricogior avatar Jun 23 '20 20:06 enricogior

When using Windows 10 Snap it always works without problem.

With FancyZones however, it works most of the time but not always.

aybe avatar Jun 23 '20 21:06 aybe

@aybe in FZ, the problem happens when you drag the window with the mouse or are you overriding the Windows Snap shortcut and using the Win+arrows to zone the Unity window?

enricogior avatar Jun 23 '20 21:06 enricogior

The problem happens when I hold LMB, hold RMB, place the window by releasing LMB then RMB.

Note that I've overridden Windows Snap shortcut.

Here are the settings I currently have for reference:

Microsoft PowerToys Settings UI Runner_2020-06-24_00-19-17

2020-06-24_00-19-41

aybe avatar Jun 23 '20 22:06 aybe

@aybe is this still a problem with 0.23? https://github.com/microsoft/PowerToys/releases/download/v0.23.0/PowerToysSetup-0.23.0-x64.exe

enricogior avatar Oct 02 '20 11:10 enricogior

@enricogior

Unfortunately, yes, it is still happening:

Microsoft PowerToys Settings UI Runner_2020-10-03_05-12-33

aybe avatar Oct 03 '20 03:10 aybe

@enricogior we should look into this either .27 or .29

crutkas avatar Oct 19 '20 23:10 crutkas

@crutkas this is more severe than the Hyper-V one, since in this case the application stops responding to events. We can try the same approach proposed for Hyper-V but very likely it won't work. This should be opened against Unity not against FZ.

enricogior avatar Oct 20 '20 08:10 enricogior

FWIW apparently this is how MaxTo handles Unity:

https://maxto.net/en/shim/unity https://github.com/digitalcreations/MaxTo/issues/165 https://github.com/digitalcreations/MaxTo/issues/74

aybe avatar Nov 29 '20 22:11 aybe

@aybe from the issue you posted:

The shim is a bit heavy handed, and disables all subclassing for Unity for now, which means you'll loose functionality such as drag-to-region for the main Unity window.

In FZ you can add the application executable name to the list of excluded apps

enricogior avatar Nov 30 '20 06:11 enricogior

Alright, thank you.

aybe avatar Nov 30 '20 19:11 aybe

It always breaks Unity for me when I use Shift drag but never when I use Win + Arrow keys.

bearoxo avatar Jan 08 '21 18:01 bearoxo

@bearoxo when you say "win + arrow keys" you mean Windows Snap or have you selected the option to use win + arrow keys to snap the window in a zone?

enricogior avatar Feb 06 '21 13:02 enricogior

@bearoxo when you say "win + arrow keys" you mean Windows Snap or have you selected the option to use win + arrow keys to snap the window in a zone?

Not bearoxo, but I'm experiencing similar issues so thought I'd add my experience notes.

Using Win + Arrow keys with FZ (Overriding windows snap) doesn't break. Using Shift + Drag breaks.

Siegvar avatar Feb 17 '21 02:02 Siegvar

@SeraphimaZ @jaimecbernardo lets keep pushing on this in 0.47.

dedavis6797 avatar Aug 05 '21 19:08 dedavis6797

I can confirm this is still happening in version 0.49.1, Unity 2020.3.16f1, when shift-dragging. I haven't tried overriding win + arrow keys.

I don't know if it's related but my display is at 175% zoom (Windows display settings). I haven't tried other zoom settings.

FUJonathan avatar Nov 24 '21 11:11 FUJonathan

Is it still reproducible on the latest PowerToys version?

SeraphimaZykova avatar Mar 09 '22 17:03 SeraphimaZykova

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

ghost avatar Mar 14 '22 20:03 ghost

I still get this with PowerToys v0.57.2 on Windows 10 Version 21H1 (Build 19043.1645) For me it happens more often than not to the point where I disable fancyzones when using Unity

micoo73456 avatar Apr 26 '22 21:04 micoo73456

@micoo73456 Can you please provide a /bugreport then to help us?

SeraphimaZykova avatar Apr 27 '22 15:04 SeraphimaZykova

Hi there!

We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks!
Report Bug

ghost avatar Apr 27 '22 15:04 ghost

Sure, here's some notes about log_2022-04-27.txt in case it's useful:

  • I turned on FancyZones at [2022-04-27 11:56:12.912874]
  • I was able to reproduce the issue at [2022-04-27 11:57:58.402057]
  • I closed and reopened Unity and the issue didn't occur for the new window
  • I closed and reopened again at [2022-04-27 12:01:01.084489] and this time the issue was back

For the first occurrence of the issue I had a few other windows open, for the second, the only open window was Unity

I hope that helps

PowerToysReport_2022-04-27-12-01-18.zip

micoo73456 avatar Apr 27 '22 19:04 micoo73456

Also experiencing this with 0.57.2. As a previous user mentioned it only happens when using left mouse drag + the right click to snap mode. Using Win + Left and Right with Override Windows Snap works fine.

CircuitLord avatar Apr 29 '22 18:04 CircuitLord

@micoo73456 @CircuitLord may I ask you for a little help? Can you try to reproduce the issue with different FancyZones settings turned on to figure out which one causes this? Especially I suspect the Make dragged window transparent, since earlier it was said that it happens only when the window is dragged with shift pressed.

SeraphimaZykova avatar May 02 '22 11:05 SeraphimaZykova

Yeah no problem, my notes:

  1. I was having trouble reproducing the issue this morning, it wasn't until I got frustrated and started moving the mouse more aggressively that it appeared lol. This led me to find that the issue happens 100% of the time if I drag the window all the way to the edge which would trigger Windows' Multitasking > Snap windows feature if FancyZones weren't enabled, so my guess is that the two are fighting in some way.
  2. Your suspicion is well founded, after disabling Make dragged window transparent I could no longer reproduce the issue.

In summary: Make dragged window transparent enabled Multitasking > Snap windows enabled -> Can reproduce Make dragged window transparent enabled Multitasking > Snap windows disabled -> Can reproduce (inconsistent/rare) Make dragged window transparent disabled Multitasking > Snap windows enabled -> Cannot reproduce Make dragged window transparent disabled Multitasking > Snap windows disabled -> Cannot reproduce

Oh, also I've always had Hold Shift key to activate zones while dragging disabled, I did some quick tests to see if it changed anything but it didn't seem to affect the behavior described above in any way.

micoo73456 avatar May 02 '22 17:05 micoo73456

@micoo73456 thank you very much!

SeraphimaZykova avatar May 04 '22 15:05 SeraphimaZykova

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

ghost avatar May 09 '22 20:05 ghost

It's still broken with latest Unity (2021.3.18f1) and latest PowerToys (v0.67.0). "Override Windows Snap" is ON and works fine (Unity doesn't break when moving via WIN+arrows) "Hold Shift key to activate zones while dragging" and "Use a non-primary mouse button to toggle zone activation" are both checked and both break unity every time (RMB click or Shift drag).

stysmart avatar Feb 03 '23 08:02 stysmart

I can reproduce the behavior described in the linked issue - the bug disappears when the Make dragged window transparent is unchecked.

stysmart avatar Feb 03 '23 18:02 stysmart

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.