Git Product home page Git Product logo

persistentwindows's Introduction

PersistentWindows

This project addresses a long-standing issue in Windows 7, 10, and 11, where windows get repositioned after events such as the system waking up, external monitor connections or disconnections, changes in monitor resolution (e.g., exiting full-screen gaming), or during RDP reconnections. The code was forked from ninjacrab.com/persistent-windows.

Original Description

What is PersistentWindows?

A poorly named utility that persists window positions and size when the monitor display count/resolution adjusts and restores back to its previous settings.

For those of you with multi-monitors running on a mixture of DisplayPort and any other connection, you can run this tool and not have to worry about re-arranging when all is back to normal.

Key Features

  • Keeps track of window position changes, and automatically restores the desktop layout, including the taskbar position, to the last matching monitor setup.
  • Supports remote desktop sessions with multiple display configurations.
  • Capture windows to disk: saves desktop layout capture to hard drive in liteDB format, so that closed windows can be restored after PC reboot, with virtual desktop observed.
  • Capture snapshot to ram: saves desktop layout in memory using one char from [0-9a-z] as the name. The window Z-order is preserved in the snapshot.
  • Webpage commander to improve the efficiency of web browsing for all major web browsers using one-letter commands like in vi editor.
  • Efficient window switching between foreground and background dual positions.
  • Pause/resume auto restore.
  • Automatic upgrade support.
  • For more Features and Commands, take a look at the Quick Help page

Installation

  • Download the latest PersistentWindows*.zip file from the Releases page
  • Unzip the file into any directory.
  • You can remove the version number from the folder name, because when the program is updated to newer versions, the folder remains the same

Note: the program can be run from any directory, but the program saves its data in C:\Users\[User]\AppData\Local\PersistentWindows

To set up PersistentWindows to automatically start at user login:

This can be done by creating a task in Task Scheduler, or by adding a shortcut to the Startup Folder (shell:startup).

For PersistentWindows to be able to restore windows with elevated privileges (for tools like Task Manager or Event Viewer), it needs to be run with Administrator privileges.

Choose one of the three options:

Task Scheduler (Windows 10/11)

  • Run auto_start_pw.bat file (preferably as administrator) to create a task in the Task Scheduler. auto_start_pw as administrator

Task Scheduler (Windows 7/10/11)

  • Create a pw.bat file in the installation folder with following content
  start "" /B "%~dp0PersistentWindows.exe" -splash=0
  • Launch a DOS window (cmd.exe) with admin privileges, goto (cd) the PW installation folder, and run the following command
schtasks /create /sc onlogon /tn "StartPersistentWindows" /f /tr "'%~dp0pw.bat'" /rl HIGHEST
REM Override High DPI Scaling
REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0PersistentWindows.exe" /t REG_SZ /d "~ HIGHDPIAWARE" /f

Startup Folder (Windows 7/10/11)

  • Create a shortcut in the startup folder:

    • Win + R, type shell:startup
    • Create a shortcut to PersistentWindows.exe and place it in the Startup folder
  • For Administrator Privileges:

    • instead of a shortcut, create a .vb file (you can call it PersistentWindows as Administrator.vb) and add this to it:
      Set objShell = CreateObject("Shell.Application")
      objShell.ShellExecute "C:\path\to\PersistentWindows.exe", "", "", "runas", 1
      
    • replace in the script the path to the PersistentWindows.exe file (the location where the PersistentWindows folder was saved)

    Note: It is possible for set shortcuts to be run as administrator, through the shortcut properties menu. However, this doesn’t work when opening the shortcut through the Startup folder, which is why we use this workaround with the .vb script

Usage Instructions

  • Run PersistentWindows.exe (preferably as administrator). Note that this app has no main window and its icon is hidden in the System Tray area on the taskbar by default.

  • To have the icon always appear on the taskbar, flip on the PersistentWindows item in the taskbar settings.

    taskbar setting
  • Right click the PersistentWindows icon to show the menu, where the capture and restore actions can be selected. image

  • To restore the taskbar position, avoid moving mouse when the icon turns red.

  • When software upgrades are available, a notice will show up in the menu.

Privacy Statement

  • PersistentWindows performs its duty by collecting following information:
    • window position
    • window size
    • window Z-order
    • window caption text
    • window class name
    • process id and command line of the window
    • Ctrl, Alt, Shift key strokes when clicking or moving a window
    • Ctrl, Alt, Shift key strokes when selecting PersistentWindows menu items
    • key-stroke events when interacting with the PersistentWindows icon on taskbar
    • key-stroke events (only as webpage command shortcut), mouse click/scroll events and cursor position/shape in web browser when webpage commander window is activated (Alt + W)
  • The history of keyboard/mouse events is typically erased 1 second after received
  • Window information history is kept in ram or on the hard drive in LiteDB file format, waiting to be recalled by auto/manual restore
  • PersistentWindows periodically checks the github repository for software version upgrades. This can be disabled in the options menu.

Known Issues

  • PersistentWindows may malfunction on fractionally scaled display (such as 125%, 150% etc), it is strongly suggested to override the high DPI scaling property of PersistentWindows.exe to "Application" via Properties->Compatibility->Change high DPI settings dialog from explorer, user needs to capture windows to disk immediately after relaunching PW w/ the new DPI setting. image

  • PersistentWindows can get stuck in a "busy" state (with a red icon in the System Tray) during a restore if one of the windows becomes unresponsive. You may find out the culprit window in Task Manager using "Analyze wait chain". The unresponsive app might need an immediate hot-upgrade, or need to be killed to let PersistentWindows proceed

    image wait chain

Tips To Digest Before Reporting A Bug or Enhancement Request

  • PersistentWindows provides a rich set of command line options for customization, check out Quick Help page for a complete list of available options. how to customize command line options

  • The window Z-order can be restored in addition to the two-dimentional layout. This feature is enabled for manual snapshot restore only. To turn on Z-order fix for automatic restore, run PersistentWindows with -fix_zorder=1

  • To help me diagnose a bug, please run Event Viewer, locate the "Windows Logs" -> "Application" section, then search for Event ID 9990 and 9999, and copy-paste the content of these events to the new issue report, as shown in the following example image

  • If there are too many events to report, click "Filter current log" from the Action panel in Event Viewer, choose all 9990 and 9999 events in last hour, then click "Save Filtered Log File As", select "Text (*.txt)" format, and attach the saved events file to the bug report

    image

persistentwindows's People

Contributors

aljgom avatar davidmichaelhuber avatar dependabot[bot] avatar garyd9 avatar kangyu-california avatar kwlockwo avatar morrisonbrett avatar neon-dev avatar pchng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

persistentwindows's Issues

Multiple Monitors not restored properly

Hi, I've been using this for a few months and it has worked great with my previous setup. I always use with the laptop open and I used to just have one external monitor at home, and two at work and windows were always restored properly. But now I have 2 27" monitors at home, and the 2 24" monitors at work. I was running an older version, but upgraded to 4.5 yesterday and ran a "Capture windows to disk" after upgrading while at work. Then at home last night the windows were restored properly, but this morning when it restored windows at work they all just stay on the main laptop screen?

App not launching

Just wanting to know if I'm missing something. Using windows 10 with whatever the near latest update is and the app will not run or launch. No splash window nor background task nor notification icon anywhere to be found after some days of trying. Any ideas?

Taskbar position will not be restored

Tested PersistentWindows 3.6 today, it restored the window positions perfectly. But it does not restore the Windows Taskbar position.

My setup:
Windows 10 - 1909 - 64 bit
2 screens:

  • My primary screen: 2560x1440x144
  • My secondary screen: 1920x1080x60

I have my primary Taskbar on my secondary screen, to be able to access the application icons to the left of the clock while having a full screen application on my primary screen. But every time my two screens switch to standby (energy saving options), my primary Taskbar is on the primary screen again.

Is it possible, that PersistentWindows restore the Taskbar position too?

Presistent windows now showing in task bar

I run with task scheduler if that matters, might show up very briefly if I attempt to start a 2nd instance of PW(this is likely only the 2nd instance attempt which is really just the error message)

Cannot alter settings or change how it works.

V2.6 not auto running and/or shutting down

Since loading V2.6 I have had several occasions when windows have not been restored correctly after a sleep. I checked and Persistent Windows was not running at the time.

It seems to not be auto running on Windows start (which it used to) and I think I noticed a couple of times when I had manually run it and then it wasn't running some time later.

PersistentWindows dont remember my capture after reboot pt2

Continue from issue #48 - Thanks for the update man but tested 4.41 and bug still not fixed, restore option greyed out after restart and I captured it before restart, db files not updating after I hit capture. Program is not reading/saving it good. Maybe I need install another Windows 10 version but I dont have problems with other software.

image

PersistentWindows opens the Windows "Settings" app instead of the "Microsoft To Do" app

PersistentWindows (PW) opens the Windows "Settings" app instead of the "Microsoft To Do" app.

I have included the "Microsoft To Do" window in the "Capture Windows to Disk" function. If I perform the "Restore windows from disk", the windows "Settings" app launches and is placed in the exact position where I want the "Microsoft To Do" to be.

However, if "Microsoft To Do" is manually opened and then I choose "Restore windows from disk", PW correctly positions the app.

Notes: I have PW running with "highest privileges" (via Task Scheduler). The incorrect opening of "Microsoft To Do" also occurs if I run PW manually, with or without "Run as administrator". This is on Windows 10 v2004 Build 19041.508.

[feature request] create chocolatey.org package / implement auto update ?

Hello Folks :)

Is it possible to create a chocolatey.org package for PW - To get the feature for auto-update PW ?
(I am not sure: I Heard from auto-scripts using githubs API to create chocolatey packages ?)

Or implement an auto-update feature in PW itself ? Would be really nice :)

Please keep up the great work ! Really helpful App :)

Minimized windows keep popping back up

Hi there,

I started using your fork of PersistentWindows (v4.3.0) as of yesterday. I hadn't realised it existed. -- Thanks for continuing work on this utility.

I've noticed an issue vs the original whereby when you minimize a window this utility will cause it to reappear within a second unless you pause auto-restore. It also happens when you ALT+TAB to different applications. This likely shouldn't be the case if the user explicitly decides to minimize a window. -- A particularly regular cause is resuming a session after a lock or screensaver.

I did pause auto-restore for a while, but at a later point when you want to resume it to correct resolution and monitor power changes (because that's the whole point of the utility) it'll resume opening up minimized windows.

Always-on-top status appears to be set after restore

Hi there,
There appears to be some kind of usage of the windows always-on-top flag for windows that are restored.
After a restore, certain windows are stuck as always on top, and I cannot lower them behind other windows I want in the foreground unless I minimize them.
This is very annoying, to the point that I can't use PersistentWindows.
I'd rather manually reposition my windows each time, as if a window is 'stuck' as always on top, it appears the only way to fix it is to destroy and recreate the window by closing the app in question.

Right now one of my Firefox windows, and one of my Edge are stuck just like this.
Very annoying.

Feature Request: Remember Taskbar Locations

Real quick, thank you for this. I've been looking for a solution to this, on and off, for...years?

Anyway, as title. The displayport windows issue also takes the taskbar and returns it to the primary monitor, even when locked. If it's possible to remember the position of the taskbar and put it back as well, that would be fantastic. Thanks regardless though!

Notification spam upon window restore

Hi,
This is not a high priority issue - might not even call it an issue at all;
Thought I would log it anyway.

When PersistentWindows detects that it needs to restore the window setup, and begins doing so; it appears to fire a UI notification for each window that it restores.
This in turn fires a windows notification sound for each window as it is restored.

Would be great if there was a single notification which started out saying restoring windows, then changed to done when complete, then disappeared.

As it is currently, if you have your speakers turned up you get spammed with many sequential notification sounds each time you restore monitor setup.

Windows Service

would it be possible to run this program as a windows service?

Certain apps do not seem to get restored to positioning.

Hey, glad that someone picked up the PersistentWindows project - I like the saving state option you added, it's very helpful.

I use Sticky notes for little things (the built-in Windows version) and I've noticed that they do not restore their positioning (even when manually saving).

V2.1 comments

Hi Kang Yu,

I have just downloaded V2.1 and ran it but I am not sure if it is the correct version running.
I can see a Persistent Windows icon in the System Tray but not in the Task Manager?
When I right click the icon in Sys Tray it offers Diagnostics and Shutdown. Diagnostics opens a small blank window (on the 3rd monitor) with the title MainWindow.
Somewhere you need to indicate which version is running.
It would also be nice if a small confirmation dialog pops up when you first run the program.
Regards,
DG

V2.8 not working

Bad news I'm afraid. I have loaded V2.8 and after several sleeps, it is not working :-(
It is still running but I have not restarted the PC so I can't say whether it auto runs or not.

New windows open off screen

I love this program, thank you so much for the effort you have put into it. It saves me so much time!

This is not an issue, but a feature request. I have 3 different monitor configurations I use with my laptop, and with some configurations when opening a new window it will open off screen and I can't get it moved to the current screen.. Java apps seem to be the worst, and I have one Java app I use a lot... Would it be possible for PersistentWindows to see a window was opened off screen and automatically move it? Or an option in the menu to move off screen windows to a real screen? I've tried all the tricks using key combinations to get it to move, but with some programs that does not work.

Not working

Hi, first i wanted to thank you for making this amazing app.
I have been using it for over a month with no issues, but suddenly after installing and removing DisplayFusion, PersistentWindows stopped working :(
Any idea on what could be the reason ?

Win+Shift+S window gets moved

Thanks for fixing the initial Win+Shift+S issue so quickly! However, I have tested it out and am having a different issue with it now.

When pressing the hotkey, it seems to present a window with a full greyed-out screenshot of both my monitors, but positioned such that it's supposed to cover up both monitors, and then lets you drag a box to crop it for the final screenshot.

However, my left monitor is a lower resolution that my right one, and in my display settings I've lined them up so that the top of my right monitor is above the top of my left monitor:
image

I believe this triggers your new "off screen" detection because it moves this grey window to my right monitor instead:
image

Perhaps the "off screen" detection shouldn't be so aggressive?

Windows restoring not works with TV with DSR

I install your program to avoid shrinking windows when turn off display sometimes and when change it to 640 x 480 every window. After turn off monitor and have TV on standby and turn on TV windows are shrink and after turn on to primary monitor restored was only not minimized window. For me program solves nothing, maybe it's because Dell monitors causes many several problems on display port.
Monitor : Dell PH2419H
uses Display Port
TV: Phillips 32PFL8605H
uses HDMI

Restore Z-Order Not Working

Hey all, so I know Z-Order is still experimental, but I wanted to share logs from it.

PersistentWindows: Restore zorder succeeded by repositioning window "Inbox - [email protected] - Outlook" (00050FA6) under "Telegram" (00010D30)

Those two programs are on opposite ends of my monitor and those windows are never near eachother.
I'm not sure how Windows handles the Z-Order of windows that don't even overlap.
There's even an instance of this talkign about apps on 2 different monitors completely and where it's positioning their Z-order.

This happens on just about everything and I think because so many windows are open across different screens things end up restoring out of order still in the long run.

If I can be of more assistance here just let me know, subscribed to replies.

Unable to run - The system cannot execute the specified program.

Hello. I've just downloaded & unzipped your program onto my windows10 64-bit machine, but when I run it I get the rather cryptic error: "The system cannot execute the specified program." When I run as adminstrator I get the equally cryptic "the parameter is incorrect".
Hoping you can shed light.
Cheers

PersistentWindows not fully starting?

I unzipped the entire directory and ran it as the current user but no splash screen opens. It loads into the task bar but only shows these two options:
image

Latest version of Windows 10.

Also if my monitors go to sleep and wake up the window positions are not saved. Nothing shows up in diagnostics and the Windows event log has no 9999 or 9990 events.

Breaks screenshot hotkey Win+Shift+S

With PersistentWindows enabled (version 4.38.7568.26621), when I use Win+Shift+S to take a screenshot, PersistentWindows causes a black square to appear on my screen instead, and dragging to take a screenshot is impossible. Disabling PersistentWindows makes it work again, so I'm pretty sure that it's the culprit.

Can I buy you a coffee ?

At last, a fix that is actually working. This annoying windows issue is finally gone. Thank you so much !!
You should definitely add a "buy me a coffee" link :)

Move windows, click back to full screen app on other screen, windows immediately moved back

As title. I move windows (Discord, firefox) where I want them, so I can best see them on my secondary monitor. Then I click back into the full-screen app in question, and it moves them back to some previous location that it seems to be stuck on. Maybe something I mistakenly saved to disk at some point? Let me know where that is stored and I can delete it if that might help.

Downloaded latest version, doesn't resolve issue. Windows 10, being run as admin. Here's the 9990 event log that occurs when this happens:

Log Name:      Application
Source:        Application
Date:          9/19/2020 9:53:45 PM
Event ID:      9990
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      MStation
Description:
The description for Event ID 9990 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

PersistentWindows: Start restoring window layout back to 9/19/2020 9:53:11 PM for display setting Display_LocM1920x0_Res1920x1080__Display_Loc0x0_Res1920x1080

The message resource is present but the message was not found in the message table

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application" />
    <EventID Qualifiers="0">9990</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2020-09-20T01:53:45.878179600Z" />
    <EventRecordID>9354</EventRecordID>
    <Channel>Application</Channel>
    <Computer>MarcStation</Computer>
    <Security />
  </System>
  <EventData>
    <Data>PersistentWindows: Start restoring window layout back to 9/19/2020 9:53:11 PM for display setting Display_LocM1920x0_Res1920x1080__Display_Loc0x0_Res1920x1080</Data>
  </EventData>
</Event>

Switching focus from fullscreen HDR content

Some background on the issue. I am not sure if this is specific to the monitors I have but when I open a full screen game that supports HDR the monitor will go blank for a few seconds. I assume this is some kind of state change to support HDR but I know very little about display tech. The normal operation is that when you alt+tab from the game to a different window the game will minimize. With PersistentWindows running it will save the state before bringing the game into focus and then because of the monitor going through it's state change this will cause PersistentWindows to restore everything to before that state change which then leaves the game minimized. Also sometimes the reverse happens where focus cannot be changed to a different window. Sometimes this will also cause a problem where PersistentWindows will continuously restore over and over again leaving the pc in a black screen loop. This loop only happened to me once and I have been unable to reproduce it.

Upgrade Instructions

HI there,

I'm recently new to using Persistent Windows, but it's been a lifesaver with my 4K laptop and the multiple different monitors I end up plugging in to.

However, I see that v5 is released and I want to upgrade from v4.44. I just wanted to confirm the correct upgrade steps. Should I be copying over the new files to my "install" location? Or is there a DB/preferences file I should not copy (or merge) so that the history of devices and how my windows were setup are maintained?

Thanks!

Is there a way to temporarily turn off "PersistentWindows"? Or apply to just certain apps?

Sometimes I don't really want the windows restored to how I "captured windows to disk", as I would like a monitor to be off. Maybe I'm not using it right, but wasn't this supposed to leave everything simply based on where the applications were when turning off the monitors? Or is it purely based on how you "captured windows to disk"? Cause having the windows forcefully open up to one monitor seems to just create the same problems, but on the other side this time. Of course I'm probably in the minority here when I just use one monitor instead of both, but I'm hoping I'm just screwing something up here for more ease of life.

An issue that I think is related to this:
I find that having videos set at full screen (YouTube's the only one I've tried) then turning off the monitor makes things very wonky, to replicate:

  • First, the YouTube video is set to full screen on the OTHER monitor than google chrome was "captured windows to disk" to
  • Then, I turn off both monitors, one being the weird undetectable one cause of DisplayPort or something (this is the "OTHER monitor" mentioned above)
  • Then, turn both back on and the fullscreen video will show up on the set "captured windows to disk" side
  • Then, turn off fullscreen and it flips to the other side
  • Then, minimize the window and it switches back over yet again but stays put thereafter

Feature Request - Disable Notifications

Well first I want to say TAHNK YOU for this program. It's working wonderfully so far! I had a few quirks with the original, and another fork, before I found this one, and I'm glad to see you still actively update it!

The other fork I was using (https://github.com/lukefor/persistentwindows) did not show a notification upon logging back in and it engaging to restore the windows.

A simple checkbox on the right click menu of the tray icon to enable/disable this notification may be nice. I'd prefer to not see it every time I log back in, but it's not a huge issue.

I also prefered the origianl icon to the new updated one, not that the icon would stop me from using this. Just tossing in my unwanted 2 cents ;)

Thanks again for the hard work on this!

disable during fullscreen

I really like the work you have done here. It saves me a great deal of annoyance when switching monitor sources for work.

On thing though. If I am playing a game in fullscreen and need to get back to another app for a second, I can't. When I try to Ctrl-Tab to a different program, this software kicks in and immediately reverts back to the fullscreen. Right now, it means I have to turn PersistentWindows off when playing a game and the remember to turn it back on after I am done.

Could you add some sort of detection to not save fullscreens and try to restore them? Even just some sort of option to enable it would be great.

Thanks!

Not an issue

Hello,

I have no issue but I don't see where to contact you to buy you a coffee :-D provide a PayPal link or something else.

this code simply WORKS ! tried others tools, free and paid, I keep this one !

Greetings

V4.0 problems

I am running V4.0 and there are two problems:

  1. The save window sizes to disk does not work. I do the save, move the windows around and then do 'Read from disk' and nothing happens. ??
  2. 3 or 4 times in the last week, the PC has woken from sleep and the windows are on the wrong screens :-(

Cheers,
DG

PersistentWindows dont remember my capture after reboot

I have 2x monitors connected by Displayport and using windows 10 Enterprise LTSC, I installed last 4.40 version and after I reboot persistentwindows dont remember the captured position and I cant restore it (restore option is greyed out). I tried with/without admin privileges.

image

Version 2.7 only works partially!

Windows 10 Pro, LG 24UD58 (4K)

When I turn the monitor off with its switch and then back on again, the windows "persist" in their proper sizes and locations.

However, when I put the computer to sleep they don't (they come back in the upper left corner in smaller size).

Thanks for your efforts on this!

Programs minimized to the taskbar are resized

I have two Intel NUCs connected to one monitor with two HDMI inputs on the monitor.

My 8th generation NUC maintains proper windows sizing whenever I switch the monitor to my 10th generation NUC, and back. PersistentWindows is not running on this NUC.

However, the 10th generation NUC, when switching the monitor to the 8th generation NUC and back doesn't handle programs minimized to the taskbar. When restoring the taskbar programs, they are 1/4 screen size and positioned in the upper left part of the display. This NUC is running PersistentWindows. The same issue occurs when PersistentWindows is not running.

All the drivers, and BIOS, are current.

Program needs to be exited and restarted for it to work.

Hello,

I installed the program a couple of days ago and it worked fine. I set it up to autostart after observing it move the windows back to the original position after the monitors are woken from sleep. However after the first restart I noticed it no longer would reposition windows after the monitors are taken out of sleep mode. I tried the capture windows to disk and that didn't work. The only thing that worked is exiting the program and restarting it. I tested it again and then it worked.

Window moved back to main screen (4.40)

I have secondary screen on the left side of the main.
If I move some windows on secondary monitor they gets moved back in a second.
Tested on Visual Studio Code, Discord, Slack - looks like chromium based apps affected.
Other windows seams to be unaffected.

Event logs:

The description for Event ID 9999 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

PersistentWindows: top left of Rect (-1932, 489), 1846 x 1104 is off-screen

The message resource is present but the message was not found in the message table

The description for Event ID 9999 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

PersistentWindows: Auto fix invisible window "004722EC"

The message resource is present but the message was not found in the message table

Conflicts with BrianApps Sizer (4.x) somewhat

I use Sizer alongside this program for window management purposes, but PersistentWindows' window reposition detection is set off by it. If PW's stored a size and position for a window at any given resolution, if say, I reposition it to exact center with Sizer, PW will immediately snap it back to its stored location, even though a screen resolution change didn't occur. I imagine it's the sudden, programmatic movement of the window or the fact a piece of software did the movement and not a real mouse input.

Would it be possible to whitelist this or change behavior to get around it? Process name is "sizer.exe" and it hooks with hook32.dll and hook64.dll. Many of my other issues with it have been fixed over the many updates this has had. (I really only have PW for those older video games I can't run or don't want to run at higher resolutions but also aren't kind enough to set the window positions back where they were after they have closed).

Thanks and sorry for any trouble, and if it can't be fixed I'll probably figure out my own workaround (beyond simply pausing auto-restore).

Refresh after moving windows back

some windows moved to the primary screen are blank or show only a part of the contents after they were moved. Then they also are blank when moved back (see attached screencopy of a browser window)
Could it be possible to add an optional "refresh window" by parameter? At the moment I do this manualy with the shortcut F5

2020-08-30 15_18_37-Clipboard

V3.8 - Tool is not working for me

My setup:

  • main display: 3840x2160 (125%), quite slow to wake from stand by
  • second display : 2560x1440 (125%), faster to wake from stand by

Most of the time, windows positions are not properly restored:

  • some windows of the main display are resized to the second display size
  • some windows of the second display are moved to the main display

Can you help me ? What kind of information should I provide ?

Thanks

Snapped windows are not always restored to their original position.

Thanks for your work on this Kang Yu, if you have a PayPal account I would be happy to send a few bucks.

The latest version, 2.5, seems to work better compared to previous versions regarding restoring snapped windows, but unfortunately sometimes it still fails to restore them properly.

Not sure what about my particular hardware triggers it, but this is what usually happens:

I have two windows snapped left and right on my secondary display. I let the displays enter sleep mode then, after a minute or two, I move the mouse to wake the displays from sleep.

First the main display wakes up, and I can temporarily see the two windows snapped left and right on it, while the secondary display where they were originally still wakes up.

When the secondary display finally finishes waking up the windows disappear from the main display, then they show on the taskbar of the secondary display (I configured that taskbar to only show the windows on that display), but they are not actually visible. They seem minimized.

If I click on their icon on the task bar the two windows become visible, on the secondary display, but they are not snapped left and right anymore, instead they seem to be in the position they were before snapping them.

Sometimes both windows are restored properly. Sometimes only one of the two windows. Looks like some kind of race condition.

If it matters my setup is NVidia RTX 2080, Asus ROG PG348Q 3440x1440 primary display, Samsung U23H850 4K secondary display, both connected through DisplayPort.

If there is anything I can do to help debug this let me know. While I'm not very familiar with Windows programming, I'm a software developer myself, and I might be able to help.

PersistentWindows never re-opens the "Windows Terminal" app

PersistentWindows (PW) never re-opens the "Windows Terminal" app. However, once it is manually opened, PW will reposition it as it should. I have PW running with "highest privileges" (via Task Scheduler). The non-opening of "Windows Terminal" also occurs if I run PW manually, with or without "Run as administrator".

How to stop: Splash window will pop up

Is it possible to stop this? : Run PersistentWindows.exe as normal user, a splash window will pop up, indicating the program has started successfully.

The program is awesome, but I really don´t need the pop up :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.