manutalcual / winredock

Rearrange windows on traybar icon click after docking the laptop
GNU General Public License v3.0
533 stars 32 forks source link

Some closed windows are restored #12

Open zoidy opened 5 years ago

zoidy commented 5 years ago

Using branch I0010-restoring-positions-doesnt-work as requested in #4

Saving and restoring windows (using the built-in timer to avoid having to click Get Windows, Save Config, Read Config) works well. Maybe too well. Certain windows that I've closed get "restored" after I re-dock. I can reproduce reliable with the Outlook Reminders window (other windows like pop-ups sometimes do it too.

Steps

  1. Start from a freshly rebooted computer, docked
  2. Open the Outlook (2016) App on a secondary monitor
  3. Open the Outlook reminder window and move to primary monitor (if not there already)
  4. Wait a few sec for WinRedock to save windows
  5. Close the reminder window
  6. Undock and redock
  7. Reminder window re-appears, even though I had closed it. wm.log
manutalcual commented 5 years ago

I suspect those re-appearing windows aren't really closed, they are just hidden. That's why they reappear. I've done some modifications to try to not take in account those. Could you try?

Thanks.

zoidy commented 5 years ago

Thanks for the quick update, I think the issue is partially fixed.

If instead of closing the window before undocking, you undock first and then close it, the window will re-appear when you re-dock.

manutalcual commented 5 years ago

I've added code to remove another configurations closed windows from the current one. If you have time could you test it?

Thanks a lot.

zoidy commented 5 years ago

It seems like it didn't work :( The closed window still re-appears (tested with the Outlook reminders window) wm.log