[Implemented] Window Position

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
MozillaUser233

[Implemented] Window Position

Unread post by MozillaUser233 » 2013-11-21, 22:23

I'm stuck on PMx64 20.3.

Moonchild, is there any way you and your team would be able to reimplement into palemoon, what mozilla removed or have done?

Explanation:

Supposedly, Firefox22 and prior what ever version this would be in palemoon, closing palemoon @ what ever window position the browser was, then starting or restarting, palemoon 20.3 starts up where it left off, as in window position.

The latest release of PM, and FF, this is no longer working. Latest PM,FF, starts up with a window position reset.

Any ideas or clues?

If any other explanation is needed, just ask, I will try to re explain the problem.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Window Position

Unread post by Moonchild » 2013-11-21, 22:26

I'm not entirely sure what the problem would be - I use Pale Moon on a daily basis myself, and it perfectly remembers all my window positions (as it should). It remembers the exact window position and size I was using last time I used the browser, and I don't think this code has changed in the underlying Mozilla code base.

Please explain in detail what problem you are encountering?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

MozillaUser233

Re: Window Position

Unread post by MozillaUser233 » 2013-11-21, 22:38

Moonchild wrote:I'm not entirely sure what the problem would be - I use Pale Moon on a daily basis myself, and it perfectly remembers all my window positions (as it should). It remembers the exact window position and size I was using last time I used the browser, and I don't think this code has changed in the underlying Mozilla code base.

Please explain in detail what problem you are encountering?
I use all-in-one sidebar addon, there is a sidebar switch. On 20.3, I leave PM, set slightly off screen, so when I move my mouse to the left of the screen, my mouse falls onto the sidebar switch and I can open the sidebar. The latest PM/FF, does a window position reset, so every time I start either one of the latest of PM or FF, I have to manually move the browser slightly off screen. 20.3 holds this in memory some how, the latest does not.

I am sure, I can make a video of it if you would like to see the different behaviors, if really needed.

Same as prior, if more detail is needed, will try and provide.

Tested with brand new profiles and old ones, same results as explained.

Blacklab
Board Warrior
Board Warrior
Posts: 1081
Joined: 2012-06-08, 12:14

Re: Window Position

Unread post by Blacklab » 2013-11-21, 23:19

Is OP Pitroad's "AIOS issues" topic on mozillaZine describing the same problem?

In any case one of the mozillaZine replies isn't exactly good news for any AIOS related problems:
Elbart wrote:Don't expect any bugfixes: http://firefox.exxile.net/forum_new/vie ... 6&t=174408

MozillaUser233

Re: Window Position

Unread post by MozillaUser233 » 2013-11-21, 23:43

Blacklab wrote:Is OP Pitroad's "AIOS issues" topic on mozillaZine describing the same problem?

If so one of the mozillaZine replies isn't exactly good news:
Elbart wrote:Don't expect any bugfixes: http://firefox.exxile.net/forum_new/vie ... 6&t=174408
Nope, I disabled AIOS, move the latest PM/FF browser off screen just a little, close, open, gets pushed back "on screen" not a little bit off screen.

Here is another person having the same problem.

https://support.mozilla.org/en-US/questions/962982

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Window Position

Unread post by Moonchild » 2013-11-21, 23:55

Ah, okay, you left out quite an important piece of information in your original post.

It is normal behavior for an application to position itself in the visible area of the screen if a previously saved position is out of bounds. If you don't do this, then your entire application window may end up off-screen, and as a result completely invisible.

Just an example:
Say, you have a dual monitor setup, and extended your desktop area over both monitors. You move the browser to the second monitor, and close it there. You then disable or disconnect the second monitor and launch the browser. What would happen? It would open completely off-screen, with no way to access the application.

I'd say that the previous behavior (saving out of bounds window positions and restoring to them) was a bug that got fixed.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

MozillaUser233

Re: Window Position

Unread post by MozillaUser233 » 2013-11-22, 00:07

Moonchild wrote:Ah, okay, you left out quite an important piece of information in your original post.

It is normal behavior for an application to position itself in the visible area of the screen if a previously saved position is out of bounds. If you don't do this, then your entire application window may end up off-screen, and as a result completely invisible.

Just an example:
Say, you have a dual monitor setup, and extended your desktop area over both monitors. You move the browser to the second monitor, and close it there. You then disable or disconnect the second monitor and launch the browser. What would happen? It would open completely off-screen, with no way to access the application.

I'd say that the previous behavior (saving out of bounds window positions and restoring to them) was a bug that got fixed.
Would you be able to confirm this was a bug that was fixed? I really hope it is not a bug that was fixed, but a feature removed or even a about:config setting. This is so important to have back. Would you be able to do some digging for me and find out exactly what is/was fixed or removed?

Thanks, Moonchild, I appreciate the help.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Window Position

Unread post by Moonchild » 2013-11-22, 00:20

That would be bug #864107
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

MozillaUser233

Re: Window Position

Unread post by MozillaUser233 » 2013-11-22, 00:34

Moonchild wrote:That would be bug #864107

Ekk. That sucks :(.
Comment on attachment 740195 [details] [diff] [review]
constrain restored window dimensions to available screen area

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Longstanding bug, but the introduction of hi-dpi support for Windows will mean more users experience it.

User impact if declined: Restored windows may not fit on screen.

Testing completed (on m-c, etc.): In Nightly; also confirmed to fix bug 852371 using Aurora tryserver build (see comment 8).

Risk to taking this patch (and alternatives if risky): Low risk - code change is simple and well understood.

If there are users who have *deliberately* placed windows partly/fully off-screen, and expect Session Restore to maintain that position, this will change that behavior, and so could be seen as a regression - but it seems unlikely that is a widely-desired feature.

String or IDL/UUID changes made by this patch: None
I believe it is a widely desired feature. Belief is far from facts though.

It would be awesome if they can implement this as a feature in about:config settings.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Window Position

Unread post by Moonchild » 2013-11-22, 00:42

MozillaUser233 wrote:I believe it is a widely desired feature. Belief is far from facts though.
I think your belief may not be shared by the majority of users. Not many people purposefully place an application partially off-screen and expect it to be restored like that in their next session.
It would be awesome if they can implement this as a feature in about:config settings.
Mozilla will not, but it should be easy enough to add a hidden pref in Pale Moon to exactly position the window where it was, of course to be used at your own risk.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

MozillaUser233

Re: Window Position

Unread post by MozillaUser233 » 2013-11-22, 00:45

Moonchild wrote:
MozillaUser233 wrote:I believe it is a widely desired feature. Belief is far from facts though.
I think your belief may not be shared by the majority of users. Not many people purposefully place an application partially off-screen and expect it to be restored like that in their next session.
It would be awesome if they can implement this as a feature in about:config settings.
Mozilla will not, but it should be easy enough to add a hidden pref in Pale Moon to exactly position the window where it was, of course to be used at your own risk.
:D Yes. Yes. Yes. Please do so if you and your team can. :D It would be wicked and even further make Palemoon Unique. Dood you're awesome.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Window Position

Unread post by Moonchild » 2013-11-22, 00:55

All right. Tell you what: the next point release of Pale Moon will have a hidden Bool pref called browser.sessionstore.exactPos and if set to true will restore the exact window position. This will probably take me very little time to add, anyway.

(hidden pref means you have to manually add it in about:config with New -> Boolean)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

MozillaUser233

Re: Window Position

Unread post by MozillaUser233 » 2013-11-22, 00:58

Moonchild wrote:All right. Tell you what: the next point release of Pale Moon will have a hidden Bool pref called browser.sessionstore.exactPos and if set to true will restore the exact window position. This will probably take me very little time to add, anyway.

(hidden pref means you have to manually add it in about:config with New -> Boolean)
Fantastic! Again, Thank you so much. I'm right excited.

MozillaUser233

Re: Window Position

Unread post by MozillaUser233 » 2013-11-26, 17:15

Wicked!

Thanks for the update and the newly added feature :D.

MozillaUser233

Re: Window Position

Unread post by MozillaUser233 » 2015-08-28, 14:49

Moonchild wrote:All right. Tell you what: the next point release of Pale Moon will have a hidden Bool pref called browser.sessionstore.exactPos and if set to true will restore the exact window position. This will probably take me very little time to add, anyway.

(hidden pref means you have to manually add it in about:config with New -> Boolean)
Moonchild, can confirm from your side this is no longer working with a brand new profile of latest stable version 25.7.0 (x64) palemooon?

I move my web browser off the screen half way, close palemoon, open it and it does not any longer stay off screen.

x-15a2

Re: Window Position

Unread post by x-15a2 » 2015-08-28, 17:36

MozillaUser233 wrote:Moonchild, can confirm from your side this is no longer working with a brand new profile of latest stable version 25.7.0 (x64) palemooon?
I move my web browser off the screen half way, close palemoon, open it and it does not any longer stay off screen.
I just tested this with 25.7.0 x64 and 26.0.0b1with both existing and new user profiles and it worked as expected. Previous to this testing I had not used this setting so I needed to get into about:config to configure it, but once that was done is worked as designed, even when I closed the window on a secondary display.

MozillaUser233

Re: [Implemented] Window Position

Unread post by MozillaUser233 » 2015-08-28, 18:00

Ok ty. Ita something on my end. I'll trouble shoot.

MozillaUser233

Re: [Implemented] Window Position

Unread post by MozillaUser233 » 2015-08-29, 09:51

On my old default profile browser.sessionstore.exactpos works.

On a new profile it doesn't work.

I uninstalled pm several times n cleaned out the peofiles.

I juat went to 1080p with a 24inch monitor, I wonder if that is the problem.

x-15a2

Re: [Implemented] Window Position

Unread post by x-15a2 » 2015-08-29, 12:11

Since it works in the old profile and not in the new, the difference has to be in the profile since both are using the same PM code and the same hardware. Since it's a new profile, I have to assume that you don't have any extensions or plugins in that profile so that really only leaves browser.sessionstore.exactPos , which by default is disabled and needs to be enabled by the user in each profile.

New Tobin Paradigm

Re: [Implemented] Window Position

Unread post by New Tobin Paradigm » 2015-08-29, 13:20

Doesn't "Restore windows and tabs" or whatever have to be enabled for session to be restored thus the window position?

Locked