-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sailfish-browser] Virtualize background tabs when another application is opened #231
base: master
Are you sure you want to change the base?
Conversation
654ecb5
to
43b72e8
Compare
src/webpages.cpp
Outdated
{ | ||
// In Switcher. | ||
if (!m_webContainer->foreground()) { | ||
m_backgroundTimestamp = QDateTime::currentMSecsSinceEpoch(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the browser is semi-permanently on background, the timestamp is updated on every backgroundChanged(). That prevents the memory-pressure notification and is a small behavior change not described in the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True that. Will later PR.
…n is opened Current implementation virtualizes backgrounded tabs when low memory notification (warning / critical) is received even if the browser is at foreground. Virtualizing backgrounded tabs when another application is brought foreground guarantees that there are no background tabs when another application is running regardless of low memory notification.
43b72e8
to
32b0f43
Compare
Updated. |
if (!m_webContainer->foreground()) { | ||
m_backgroundTimestamp = QDateTime::currentMSecsSinceEpoch(); | ||
} | ||
} | ||
|
||
/*! | ||
* Virtualize pages that are inactive (all but the first). | ||
* This also takes a time stamp that is later used to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. This sentence got copied here as well. Should not be here.
Another way to implement this kind of early release would be to do this when screen is dimmed meaning that browser goes to background and it is not requesting screen to be on.
Current implementation virtualizes backgrounded tabs when low memory
notification (warning / critical) is received even if the browser is
at foreground. Virtualizing backgrounded tabs when another application
is brought foreground guarantees that there are no background tabs
when another application is running regardless of low memory
notification.