kangyu-california / PersistentWindows

fork of http://www.ninjacrab.com/persistent-windows/ with windows 10 update
GNU General Public License v3.0
1.45k stars 50 forks source link

5.41: alt-tabbing from a full-screen window sometimes causes the window to not be visible upon alt-tabbing back #218

Closed Alethon closed 1 year ago

Alethon commented 1 year ago

Discovered while playing Elden Ring in full-screen mode (required for HDR support). Window appears to either be resized to an incredibly small size and/or moved off-screen, since HDR causes the screen brightness to apparently dim when the window gains focus but is not visible on screen. Proposed solutions include adding configuration options to either

  1. ignore full-screen windows
  2. support an exclusion list

User is willing to implement

kangyu-california commented 1 year ago

There are two ways to exclude a window from restore by PW,

  1. move the window with CTRL SHIFT pressed.
  2. run PW with -ignore_process "foo.exe" command option, where you need to replace "foo.exe" with the game exe file name.

You may also try other command options such as, "-fix_offscreen=0" "-fix_unminimized=0"

To further debug the issue, you may run PW with -debug_process "foo.exe" option, and observe event 9990,9999 in event viewer