Azaret / superputty

Automatically exported from code.google.com/p/superputty
MIT License
0 stars 0 forks source link

BUG+PATCH : fullscreen window size should not be saved otherwise window mode becomes recorded fullscreen size #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. position the in non full screen with specific size
2. maximize the app
3. close the app and reopen
4. the application is now window mode but the size of the fullscreen

What is the expected output? What do you see instead?
When closing the application the fullscreen size should not be recorded

What version of the product are you using? On what operating system?
1.2.0.9 (git)

Please provide any additional information below.
I believe what we should be doing is below, possibly also restore the 
windowState as well :

        CURRENT
    public global::System.Drawing.Rectangle WindowPosition {
            get {
                return ((global::System.Drawing.Rectangle)(this["WindowPosition"]));
            }
            set {
                this["WindowPosition"] = value;
            }
        }

    SHOULD BE
    public global::System.Drawing.Rectangle WindowPosition {
            get {
                return ((global::System.Drawing.Rectangle)(this["WindowPosition"]));
            }
            set {
                if (frmSuperPutty.ActiveForm.WindowState==System.Windows.Forms.FormWindowState.Normal)
                    this["WindowPosition"] = value;
            }
        }

Original issue reported on code.google.com by djtrem...@gmail.com on 3 Jun 2012 at 12:03

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Oh on another note. Since this application allows for multiple instances, we 
might want to store an array of multiple windows positions/sizes/state for 
people with 2 or 3 monitors.

This would provide starting each instance in their last position, eg first 
instance starts from position/size array[1] and next instance on 
position/size/state array[2] .etc.etc. otherwise they all restore to the same 
position/size/state. :)

Original comment by djtrem...@gmail.com on 3 Jun 2012 at 12:08

GoogleCodeExporter commented 9 years ago
oh one more thing, restoring position/size should be within the screens area. 
I've seen times when it's recorded somehow, outside the screens area (desktop 
resize?). If outsize, it should reposition within the window area and not 
outside making it easier to recover

Original comment by djtrem...@gmail.com on 3 Jun 2012 at 12:11

GoogleCodeExporter commented 9 years ago
it's currently setup to save normal or maximized state during formclose.  

bound checks are done on restore in Utils/FormUtils.  There's a bounds check 
done there.  Is there a case that's missed?

Original comment by btatey...@gmail.com on 3 Jun 2012 at 1:52

GoogleCodeExporter commented 9 years ago
I'm using the SVN version and while modifying/adding enhancements and noticed 
it didn't do it for some strange reason (should've checked the code, doh!) 
which lead me to adding to the comments but funny enough it is doing it 
now..!?!??! Only that is saves the size of the fullscreen window as the Normal 
windows state size, so when you restore the window from max to normal it still 
appears fullscreen which is not the original size (size before fullscreen), 
hence my first comment above.

Original comment by djtrem...@gmail.com on 3 Jun 2012 at 2:00

GoogleCodeExporter commented 9 years ago
looking at this...def some issue saving/restoring with maximize

Original comment by btatey...@gmail.com on 9 Jun 2012 at 11:01

GoogleCodeExporter commented 9 years ago
Tracking the desktopbounds differently so  size/location and window state 
(including max/min) can be restored

Original comment by btatey...@gmail.com on 9 Jun 2012 at 12:05