Open MikeWilliams-UK opened 4 years ago
Hi @MikeWilliams-UK , can you give an (or few) examples of applications with steps to recreate this?
Great idea, just want to be sure we fully understand the scenario.
Sure will do. I will try to compile a list of apps which do it.
Would you believe it, I am having trouble finding apps which now do this. The one I remember which gave me most grief was Notepad++, but just done a test and that now handles this properly. WinZip used to suffer too, but that was some time ago so might not be applicable now.
@MikeWilliams-UK there are other cases/scenarios that trigger this problem, I remember it happened to me without an external monitor, just closing an app when it was half way out of the screen on the left, when I reopened it, its size was smaller and it wasn't visible on the screen. It's also annoying when you have the second monitor connected but turned off, Windows still sees it so if you closed the app then it was on the second monitor it will reopen there and it's annoying to have to turn the monitor on to move the window.
@enricogior The more scenarios we can suggest the better chance of this being implimented.
not saying this isn't useful or this scenario doesn't happen. But lets be sure we can test against known scenarios so lets create a few repro steps here so we know what we are targetting and can validate something works
As a developer I appreciate that a scenario to test is vital.
I will see what I can find ...
I thought that Notepad++ and Winzip exhibitd this behaviour, but sadly not. I have found the FileZilla 3.45.1 exhibits almost the same, with most of the window off screen. Not 100% off screen which was my original gripe with the 3rd party software, but it shows it as best I can find at the moment.
I will of course update this issue when I find others.
/Mike
Possible to get a screenshot?
Just captured a screen shot
See screen shot below
I have been doing some more testing and I can now confirm that with the auxiliary monitor on the LEFT side of the laptop screen the behaviour is seen with WinZip (20.5)
I suspect that there are more applications which exhibit this behaviour due to the auxiliary screen having NEGATIVE co-ordinates.
I've also noticed that when turning off a monitor connected via DisplayPort, the monitor disappear from the Window Display setting, but if the monitor is connected via HDMI, turning it off doesn't make it disappear, and so applications that open where they were closed, they end up on the turned off monitor.
@enricogior I have seen that too as I have my laptop set up in my office connected to second monitor via HDMI. If I forget (or don't bother) to turn it on it does indead become a ghost monitor. In my case as I have windows task bar set up to "show taskbar buttons on" to "Taskbar where the window is open" I have to either turn the monitor on or unplug the cable. In this case my suggested tool would not help as there is no icon to right click on.
hmmm, since this is on app launch after the state change, this would make us have to monitor all windows. Detect launch and do the resize. Part of me wonders however how to deal with apps w/ splash screens.
just detecting "useable" screen state isn't a good state by itself since i know i've hidden windows like that on purpose.
I was thinking of it NOT being automatic for just such reasons. In Chem4Word we deliberately send windows off-screen(s) while they are composing.
I was thinking of it hooking into the right click action of a taskbar icon.
I agree, this should not be automatic.
IMHO Not being automatic should simplify the code.
Manual workaround from Raymond Chen https://devblogs.microsoft.com/oldnewthing/20090511-00/?p=18303
Sadly this does not work all of the time.
Is this issue still relevant? Anything PowerToys can do about?
I think this is a great issue but need clear repro steps. Win11 I know for some scenarios made things better in terms of dock / undock
A couple of apps that might help people out:
And to reiterate the workaround from Raymond Chen linked to above:
@SamHasler I know that the workaround exists, but I personally don't use it enough for it to be in my "muscle memory" of actions that I always end up googling for it each time :-)
Of the two apps the CLI tools looks most powerfull but requires too much detail for the average user The GUI tool by NirSoft seems to lack the ability to position a window to a specific position on a screen which would be most usefull.
I think this is a great issue but need clear repro steps. Win11 I know for some scenarios made things better in terms of dock / undock
What was wrong with my steps outlined in https://github.com/microsoft/PowerToys/issues/557#issuecomment-552097202?
@MikeWilliams-UK
NirSoft have another tool that can move (center) windows on a single monitor.
(credit to this superuser.com answer)
@MikeWilliams-UK
NirSoft have another tool that can move (center) windows on a single monitor.
1. Download the WinLister application [here](http://www.nirsoft.net/utils/winlister.html). 2. Run WinLister as Administrator and select the window you wish to move back on Screen. Not running as administrator will not give the application the ability to move the windows for you. 3. Right click and select “Center Selected Windows” and you’re done!
(credit to this superuser.com answer)
Interesting utility, thanks for pointing it out. Shame it only centres on primary screen ... Not sure why it would need admin rights for processes that are not elevated? Just tested it non elevated to try to move it's own window and it crashed !
One of the comments on the answer points out that there's also WinExplorer which doesn't need admin rights. There's also GUIPropView
@MikeWilliams-UK what's the status for your issue?
This is a nice to have.
This is still a problem and has been ever since we started to use multiple monitors and laptops.
The https://github.com/microsoft/PowerToys/issues/557#issuecomment-552097202 is very much on point. Sleep / Hibernate while on multiscreen and open in another config you often have the problem.
The WinExplorer, GUIPropView does not solve it at all. WinLister does solve it but it cumbersome.
On windows pre-11, you can alt+space, select move, press an arrow key and then position the window visible by mouse. On Windows 11, alt+space is now a global search, so instead you have to (one option) to shift+right click a window at the task bar , to get to the window menu, and then again -> move, arrow, mouse will do the trick.
The thing is that it is not impossible to do but feels decidedly dirty to do, and 90% of users out there has no clue.
I really feel that this issue should be fixed by the windows manager team (whatever they are called) at microsoft. They haven't fixed the issue in about 2 decades, so they are likely not about to. For me the great fix would be:
For power tools: 1) Would it be possible to hook into window activation? If not, 2) add a windows menu to restore on visible screen? Or 3) a global hotkey to place all windows on visible screen (filtering only the windows/programs on the start bar as there can be other hidden windows meant to be hidden), or 4) whenever windows config change, reposition those hidden windows on main screen?
I also have this problem on a regular basis.
I have a laptop with three external monitors connected through a Thunderbolt/USB-C dock. On a semi-regular basis, I either lock the computer or put it to sleep or close the screen then unplug it from the dock and take it to a different room.
When this issue happens, when I wake up/log in to the laptop without external screens connected, many/most of my applications still have their windows offscreen. Although it's possible to move the windows onscreen one at a time, it's very frustrating while multitasking.
I would not want any automatic functionality here; I just want a program/shortcut that I can run to move any offscreen windows onscreen. (I found this issue while searching for a program with that functionality.)
The most recent time it happened, I documented it:
Laptop was back and forth between asleep and awake, docked and not docked Put laptop to sleep while docked and windows open on docked screens Unplugged cables, brought laptop to lab, woke up and logged in Of the first several programs I tried, only Firefox opened onscreen, all others had to be manually moved through shift-right click menu plus additional steps; later I tried every program and had mixed results Was it caused by first going to sleep, then unplugging dock, then waking up?
Applications that were still located offscreen and difficult to access: Notepad++ (especially annoying if search window is open) Microsoft Word GNU Octave Windows Explorer Zoom Cisco Jabber Media Player (built in Windows 11 one) SourceGear Vault Microsoft Paint
Applications that correctly located themselves (were they already on the laptop screen?): HCL Notes (definitely on laptop screen already) Mozilla Firefox (this definitely had at least one window through the dock) Microsoft Excel Sourcetree STM32CubeIDE LTSpice
Would love a simple "Center on screen"
in the right click
menu of each program open on the taskbar.
My irritation is with multiple multi-monitor setups and a fairly modern laptop (USB-C for power + display(s)), Win 11. I've searched a little but to no avail... and eventually ended up here.
When I move between these desks I often have to move many open windows from a non-primary screen to the now-primary screen.
I would LOVE a simple key command or menu-driven option to move all windows to the primary monitor. I'm not too worried about minimized or not, which ones are in which locations or on which of the various non-primary monitors.
Move Hidden Windows to active screen
Some applications do not play nicely with multiple monitor scenarios. They mainly the ones which remember their screen position.
Scenario Laptop with additional monitor.
Start an affected application when you have two monitors connected and move it to monitor two, shut PC down.
Disconnect the second monitor, then start up PC and run the affected application.
All you see is a task bar icon becuse the application has blisfully unaware thet the second monitor is not preset jumped to the monitor which does not now exist.
I know there is a documented way to move such windows to an available screen, but it requires quite a bit of faffing arround. I invariably end up googling for the required key chord each time I need it becuase it does not happed that often, but often enough to cause irritation.
A hook that allowed the user to right click the task bar icon and "move to screen n" would be very much appreciated.
Some of the code in https://github.com/MikeWilliams-UK/SSMS-Window-Fixer may be of use in this.