Windows move when launching WM

Discuss problems, bugs or feature requests for WindowMizer version 4.x.
Post Reply
User avatar
rgbworld
Site Admin
Posts: 84
Joined: Sat Dec 05, 2015 5:42 pm

Windows move when launching WM

Post by rgbworld » Sat Dec 10, 2016 9:40 am

The biggest bug or issue that exists with WindowMizer 4.4.2 is the unwanted moving of windows. I am acknowledging this issue here and will explain some possible solutions that may alleviate the problem while I work on a fix.

Symptom
When launching WM or when restarting computer (with WM set to open at login), windows are arbitrarily moved onto the main screen.

Explanation
When collapsing a window, WindowMizer moves the original window Off-screen (per preference setting). When you quit an application, WM will (try) to restore those windows to their original on-screen location before that app terminates. However, WM can only restore those windows if you use the command+Q shortcut to quit your apps. If instead you choose 'Quit' from an applications menu, or if you choose 'Quit' via a right-click on an Application's dock icon, then WM cannot intercept the Quit command and therefore cannot restore that application's windows before the app terminates. When this happens, the applications window(s) are left in an off-screen position.

If a window is left off-screen when an Application is terminated, most apps will pull that window back on-screen the next time it is opened. However not all apps will do that. Some apps will leave the window off-screen and almost inaccessible (it's hidden down in the corner). So, to prevent Off-screen Orphaned Windows, WM tries to restore those windows to an on-screen position whenever a) WM is launched or b) Whenever that app is reopened.

It is WindowMizer's attempt to prevent Off-screen Orphaned Windows that is causing the arbitrary moving of windows when WM and/or other apps are launched.

Possible solution
What I am planning on doing is to add a new WM preference setting that allows the user to enable/disable the automatic restoring of off-screen windows when WM is launched. Basically, I plan to allow that "feature" to be turned off.

Turning off "Automatically restore off-screen windows at launch" will fix the issue of pulling windows that aren't "really" off-screen - back on-screen. However it puts the issue of Off-screen Orphaned Windows back on the table. Uhg!

Preventing orphaned, off-screen windows
The best way to prevent windows being left Off-screen is to:
  • Quit your applications using command+Q shortcut.
    This can be done via Application Switcher (command+tab). Pressing command+Q in App Switcher does allow WM to restore windows before the app is terminated.
  • Always Quit WindowMizer 1st (before Quitting other apps).
  • Always Quit WindowMizer before performing a Restart of computer
Hopefully with the addition of a preference setting to allow/prevent the "automatic off-screen window restore", and by adopting a habit of Quitting WM before a restart - this issue should be less common.

I hope this helps explain the underlying problem. Any suggestions or comments on my possible solution are welcome.

Post Reply