|
Post by Stefan on Mar 14, 2015 11:16:26 GMT -5
Hi Folks,
If you extend the desktop across two monitors and close SPFLite while it's window was on monitor 2, a subsequent invocation will open again on monitor 2, as expected. The hiccup comes when the 2nd monitor is not connected. SPFlite opens in the "last known position" on the non-existant monitor, making the window inaccessible.
There are two "operational" modes for Windows in this case. It could be that the desktop is still set to extend across both monitors, but the 2nd one is not present or it could be that the Windows desktop was reset to operate on monitor 1 only. It doesn't matter which mode applies when SPFlite starts, it is unaware that it's previous screen location is now unavailable.
One can regain access to the SPFlite window in these cases by telling Windows to extend the desktop onto to missing monitor and then revert back to single screen. SPFlite will then "move" its window to monitor 1.
Not a big issue, but other applications typically don't exhibit this behaviour, opening their window instead on the only available monitor.
|
|
|
Post by George on Mar 14, 2015 15:52:25 GMT -5
Stefan: I'll have to do a bit of reading on how this is supposed to be handled.
George
Ick! Of course MS makes this incredibly messy with a gazillion different GetSystemMetrics values.
I don't have multiple monitors to play with, do you know when your 2nd monitor is 'off' whether windows considers it's 'virtual' screen to be just the current primary, or is it still the full size virtual one including the 'off' monitor? Hopefully it will be just the primary.
George
|
|
|
Post by Jo on Mar 17, 2015 12:10:14 GMT -5
A workaround, when your 2nd monitor is down: in SPFLite.INI set LastScrX=0 LastScrY=0
Jo (sorry, I caused George to remove some checks ...)
|
|
|
Post by George on Mar 24, 2015 14:43:44 GMT -5
Stefan: Can you try out this test version and see how it handles the missing second monitor scenario? I have no 2nd monitor to test with, so this is a 'best guess' correction. Just download, rename to SPFLite.EXE, and swap into your install directory. www.spflite.com/Files/SPFLite825082.ex_George
|
|
|
Post by Jo on Apr 5, 2015 10:53:45 GMT -5
Downloaded and tested 8.2.5082 and again on current 8.2.5085: Excessive LastScrX-Values are reset (to 5) when the 2nd monitor is gone, which is fine, but negative LastScrY-Values are not reset. I think, negative Y-Values should also reset when the 2nd monitor is away. Negative X-values might be ok, they might also occur with just one monitor.
Jo
|
|
|
Post by George on Apr 5, 2015 12:09:39 GMT -5
Thanks for testing this. I think it has to be a bit more sophisticated in checking due to the possible negative values. So I've altered it to check if the LastX position is less than the virtual screen left position or greater than the right virtual position. Ditto for the vertical values. Can you try out another test version to see how it does? Just download, rename to SPFLite.EXE, and swap into your install directory. www.spflite.com/Files/SPFLite825095.ex_George
|
|
|
Post by Jo on Apr 5, 2015 12:37:49 GMT -5
Hm, seems, this version does not recognize, that the 2nd monitor is gone. SPFLite starts, but is not visible. When replugging monitor#2, is is seen where it was.
Jo
|
|
|
Post by George on Apr 5, 2015 13:13:03 GMT -5
Jo: Well, that would seem to indicate that Windows is still reporting the entire virtual screen, even though one of the monitors is not present. That make it really awkward since the previous X/Y location values are valid. If Windows doesn't react to the 2nd screen being powered down, and still reports a virtual screen that incorporates it, then I'm at a loss as to how to validate this whole thing, since whether it is powered on or not, I get the same values.
This non-reaction by Windows is understandable, since it also does not react to the Primary monitor being powered on or off. I think basically there's no way to cope with a monitor being simply powered on or off. If the 2nd screen were 'undefined' (or whatever the term is) then everybody would be in step, but that would be a real pain for the user compared to just hitting the power button.
George
|
|
|
Post by Jo on Apr 5, 2015 13:46:02 GMT -5
George: when I plugoff monitor#2, then I see some windows-action in repainting screen#1. And Firefox, which also was on screen#2, but minimized before plugout, redisplayed on monitor#1. So I think, windows does report the lost screen#2. Btw, simply poweroff of monitor#2 is not detected by windows, you have to unplug the VGA-cable.
Jo PS: V.8.2.5082 did recognize the loss of monitor#2 and resets LastScrX.
|
|
|
Post by George on Apr 6, 2015 12:05:11 GMT -5
Jo: Interesting how Firefox responded. I'm not at all sure how it did so because I can find no windows message related to changing monitor status.
I found a very old (and very long) MSDN article which appeared when multiple monitor support appeared, I'm hoping I'll get some tips there as to how to best manage this.
But a simple question: Why on earth are you plugging and unplugging your 2nd monitor in the first place?
I've not given up, but this is hard to do when I can't even test anything. And no, there's no way I could squeeze a 2nd monitor into my workspace, no matter how much I'd like to.
George
|
|
|
Post by Jo on Apr 6, 2015 16:23:03 GMT -5
George: The long answer to your simple question is: I like to move around with my notebook, but when at home and planning to work with a lot of open windows, than I plug my 2nd monitor. Here I have 15 more lines on the edit-screen. Ok, my desktop-pc also has a large monitor, but first I have to syncronize my working-directory...
There is no reason to give up ;-) because your version 8.2.5082 and 8.2.5085 did quite a good job: The X-value were correctly reset. Just a negative Y-value were not reset.
Jo
|
|
|
Post by George on Apr 7, 2015 10:49:53 GMT -5
Jo: Well, I'm going to keep re-reading the MS doc till I grasp it better. Then I'll have another go at it. I'll re-post here when I have another version to try.
George
|
|
|
Post by Tom Minich on Sept 2, 2015 12:55:11 GMT -5
Hi to both. I have some extra info. The disappeared window also occurs without a missing screen.
I have terminated SPFlite while showing in screen 1, and later started it again. It shows on the task bar, but with no window. If the task bar item is selected (i.e. supposedly foreground), it will accept F1 and show the help.
In every case the problem was a LastScrY=-32000. I had not switched screen 2 on/off nor powered it on/off.
Perhaps you could just sanity chech the value is non-negative before writing it at exit.
Tom
|
|
|
Post by George on Sept 2, 2015 13:07:31 GMT -5
Tom: As I've been reading it (boy I wish I had a 2nd monitor to try all this out) a negative value is not necessarily invalid if the 2nd screen is positioned to the left/top of the main monitor.
Mind you -32000 is obviously a useless value. I fear till I can get another monitor, I'll never be able to properly correct this.
George
|
|
|
Post by Stefan on Sept 3, 2015 1:05:46 GMT -5
Hi Jo & George,
First let me apologise for neglecting this forum for so long. I only received an "updated thread" email from Proboards yesterday and note there have been several entries since March. Thank you both for working on this in the meantime. Least I can do is narrow things down a bit more following some more tests.
My setup: SPFLite version 8.2.5179 on Windows 7 on a Lenovo T430 laptop either stand-alone or in a docking station. When docked, it has two monitors - the built-in screen and an external monitor. Right-click empty desktop and pick Screen Resolution. Windows is configured so that the external monitor is logically to the right of the built-in screen. Both monitors operate at 1600x900 resolution. Multiple Monitors offers 4 modes: Desktop only on 1, Desktop only on 2, Extend, Duplicate. The graphics adapter is an Intel HD Graphics 4000.
The SPFLite behaviour follows that of all other apps I use when switching between single or dual monitors, docking and undocking (see Normal Behaviour below). No difference, EXCEPT that if I close the SPFLite application while its window is on the external monitor, SPFLite insists on placing its window on the external monitor when the application is next relaunched, even if the Windows Screen Resolution dialog shows it is operating in 'Desktop only on 1' mode. SPFLite does not honour Windows' screen setting on startup. So lauching SPFLite on a single-screen system after it was last used on the external screen yields an inaccessible window.
I hope this simplifies the diagnosis - it seems to affect SPFLite startup only.
Many thanks, Stef
Normal Behaviour:
Regardless on screen mode, Windows does not detect or react to power on/off status changes of the external monitor. So monitor power status is a red herring.
In 'Desktop only on 1' mode, the mouse pointer is constrained by the edges of the built-in screen and if, for instance, you drag a window to the right or left, it snaps to half screen on that side. If I undock, there is no change. When I re-dock, Windows always switches to 'Extend' mode - regardless of the power on/off state of the external display.
In 'Extend' mode, the mouse pointer is constrained on the left but travels beyond the built-in screen's right boundary and dragging a window to the right will move it on the external monitor. It only snaps if you attempt to drag it beyond the right boundary on the external monitor. If I undock, Windows switches to 'Desktop only on 1' mode. Any apps which had windows on the external monitor, redraw these on the built-in acreen. When I re-dock, Windows always switches to 'Extend' mode - regardless of the power on/off state of the external display. All open apps' windows remain on the built-in screen.
|
|