Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rainemak
Copy link
Member

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.

@rainemak rainemak force-pushed the virtualizeOnBackground branch from 654ecb5 to 43b72e8 Compare November 11, 2014 07:28
src/webpages.cpp Outdated
{
// In Switcher.
if (!m_webContainer->foreground()) {
m_backgroundTimestamp = QDateTime::currentMSecsSinceEpoch();
Copy link
Contributor

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.

Copy link
Member Author

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.
@rainemak rainemak force-pushed the virtualizeOnBackground branch from 43b72e8 to 32b0f43 Compare November 11, 2014 09:01
@rainemak
Copy link
Member Author

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
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants