Skip to content
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

Windows don't stay in position #1033

Closed
noChamp opened this issue Jan 1, 2020 · 16 comments
Closed

Windows don't stay in position #1033

noChamp opened this issue Jan 1, 2020 · 16 comments
Labels
FancyZones-VirtualDesktop Issue that deal with FZ and VDs Issue-Bug Something isn't working Product-FancyZones Refers to the FancyZones PowerToy

Comments

@noChamp
Copy link

noChamp commented Jan 1, 2020

Environment

Windows build number: 10.0.18362.476
PowerToys version: latest
PowerToy module for which you are reporting the bug (if applicable): Zones

Steps to reproduce

  1. have a dual monitor pc
  2. have 3 virtual desktops
  3. on the second virtual desktop have 4 windows for each monitor
  4. on the second virtual desktop, set a 'grid' layout for each monitor
  5. switch to any other virtual desktop
  6. return back to the second one

Expected behavior

the windows on the second monitor stay in position

Actual behavior

the windows on the second monitor are placed one over the other

@fredrikahs
Copy link

I have the same issue with a single (21:9) monitor using only two virtual desktops. The desktops have different FancyZone layouts. Switching between the virtual desktops changes the positions of some (?) windows. The windows on both virtual desktops change positions.

I recently updated from v0.11 where I believe this issue was not present.

@fredrikahs
Copy link

I just tried version 0.13 and 0.12 and neither works. Reinstalled 0.11 and the issue is gone.

@fredrikahs
Copy link

I did a git bisect to find the issue and it seems it arose in bzoz/PowerToys@50dae8a
Commenting out dllmain.cpp#269
case EVENT_OBJECT_UNCLOAKED:
fixes the issue, but I don't know what else that might be affected since I'm not involved in the project.

@enricogior enricogior added Issue-Bug Something isn't working Product-FancyZones Refers to the FancyZones PowerToy labels Jan 16, 2020
@enricogior enricogior changed the title Windows don't stay in poition Windows don't stay in position Jan 16, 2020
@enricogior
Copy link
Contributor

enricogior commented Jan 16, 2020

Hi @noChamp @fredrikahs
thank you for reporting the issue and thank you for finding the commit that caused the problem.
We'll pick it up from here.
Thanks!

@crutkas crutkas added this to the 20.02 release milestone Jan 16, 2020
@crutkas
Copy link
Member

crutkas commented Jan 16, 2020

adding to 20.02 unless it is a quick fix.

@crutkas crutkas added this to To do in 0.16 release via automation Jan 16, 2020
@bzoz
Copy link
Contributor

bzoz commented Jan 17, 2020

EVENT_OBJECT_UNCLOAKED was added to detect terminal window creation. @fredrikahs could you provide a screenshot of all your FancyZones settings?

@fredrikahs
Copy link

It seems this is caused by using FancyZones in conjunction with https://github.com/Eun/MoveToDesktop. When I turn that off everything seems to run fine.
I totally forgot I had this running in the background. I guess I forgot since it feels like it should be native to Windows.

Anyway, not sure if the settings will help, but here they are.

fancyzones-settings
fancyzones-layout-virtual-desktop-1
fancyzones-layout-virtual-desktop-2

@tkon99
Copy link

tkon99 commented Jan 30, 2020

Same here, also when using MoveToDesktop.
Perhaps integrating MoveToDesktop into PowerToys is a good idea, seems like something that belongs in here.

Edit: related issue #16

@crutkas
Copy link
Member

crutkas commented Jan 30, 2020

@tkon99, can’t, it is GPL and that conflicts with MIT license

@tkon99
Copy link

tkon99 commented Jan 30, 2020 via email

@crutkas
Copy link
Member

crutkas commented Jan 30, 2020

we have the idea (and a prototype) for 'move to new desktop' but i do like the idea of 'moving to an existing desktop' as well. that is basically #16

@noChamp
Copy link
Author

noChamp commented Feb 3, 2020

hi @fredrikahs I don't have this extension installed and still the bug occurs

@fredrikahs
Copy link

@noChamp it might be unrelated, or maybe something else is interfering in a similar way? Does downgrading to v0.11 fix it for you?

@enricogior
Copy link
Contributor

This may be the same as #1018

@enricogior
Copy link
Contributor

enricogior commented Mar 13, 2020

As @fredrikahs pointed out, this commit 50dae8a breaks the desktop switch logic and generates random window snapping if appLastZone_moveWindows or virtualDesktopChange_moveWindows are on.

EVENT_OBJECT_UNCLOAKED and EVENT_OBJECT_SHOW events are generated when switching desktops, but they are also used in FZ to detect when a Store app is launched.
The two things are conflicting and breaking some basic FZ functionality.

@crutkas crutkas added the FancyZones-VirtualDesktop Issue that deal with FZ and VDs label Mar 17, 2020
@crutkas
Copy link
Member

crutkas commented Mar 24, 2020

We know that all VD issues are caused by the same root bug. Tracking in #1236

@crutkas crutkas closed this as completed Mar 24, 2020
0.16 release automation moved this from To do to Done Mar 24, 2020
@enricogior enricogior removed this from Done in 0.16 release Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FancyZones-VirtualDesktop Issue that deal with FZ and VDs Issue-Bug Something isn't working Product-FancyZones Refers to the FancyZones PowerToy
Projects
None yet
Development

No branches or pull requests

6 participants