Closed
Bug 1193610
Opened 9 years ago
Closed 9 years ago
Win XP and Vista screensaver doesn't disable when watching videos
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla44
People
(Reporter: gooberslot, Assigned: cpearce)
References
Details
Attachments
(1 file)
4.99 KB,
patch
|
jimm
:
review+
lizzard
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:40.0) Gecko/20100101 Firefox/40.0 Build ID: 20150807085045 Steps to reproduce: 1. Enable webm so you can get something better than 360p (step might be optional) 2. Watch Youtube video 3. Wait for screensaver activation. Actual results: Screensaver started. Expected results: Screensaver should not have started.
Reporter | ||
Updated•9 years ago
|
OS: Unspecified → Windows XP
Hardware: Unspecified → x86
Updated•9 years ago
|
Component: Untriaged → Audio/Video
Product: Firefox → Core
Updated•9 years ago
|
Blocks: MSE
Summary: Screensaver doesn't disable when watching fullscreen videos → Win XP Screensaver doesn't disable when watching fullscreen videos
Comment 1•9 years ago
|
||
Only affects the HTML player, not flashplayer, presumely.
Component: Audio/Video → Audio/Video: Playback
Priority: -- → P2
Reporter | ||
Comment 2•9 years ago
|
||
Yes, it only affects the HTML player.
Comment 3•9 years ago
|
||
Is it related to fullscreen? I think watching video itself should stop the system activating screensaver.
Assignee | ||
Comment 4•9 years ago
|
||
It's not related to fullscreen, but if you want to take this bug Xidorn, go ahead! ;) We have a wakelocklistener here: http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsAppShell.cpp#47 That receives notifications when videos start and stop playing. Don't know why it's not working on WinXP.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → cpearce
Assignee | ||
Comment 5•9 years ago
|
||
Using SetThreadExecutionState(ES_DISPLAY_REQUIRED|ES_CONTINUOUS) isn't sufficient to block the screen saver on Win Vista and XP. So periodically get the screen saver timeout, and then set the screensaver timeout to the got value, which resets the OS's timer, and blocks the screen saver without changing anything.
Attachment #8677866 -
Flags: review?(jmathies)
Assignee | ||
Updated•9 years ago
|
Summary: Win XP Screensaver doesn't disable when watching fullscreen videos → Win XP and Vista screensaver doesn't disable when watching videos
Comment 6•9 years ago
|
||
Comment on attachment 8677866 [details] [diff] [review] Patch: Use SystemParametersInfo to block screen saver Review of attachment 8677866 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/windows/nsAppShell.cpp @@ +61,5 @@ > // "locked-foreground" notifications when multipe wake locks are held. > if (aState.EqualsASCII("locked-foreground")) { > + WAKE_LOCK_LOG("WinWakeLock: Blocking screen saver"); > + // We block the screen saver by periodically resetting the screen > + // saver timeout. nit - whitespace at eol @@ +122,5 @@ > + // Resets the operating system's timeout for when to disable the screen. > + // Called periodically to keep the screensaver off. > + void ResetScreenSaverTimeout() { > + if (SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, 0, &mScreenSaverTimeout, 0)) { > + SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT, mScreenSaverTimeout, NULL, 0); Where did you find this trick?
Attachment #8677866 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #6) > Comment on attachment 8677866 [details] [diff] [review] > Patch: Use SystemParametersInfo to block screen saver > @@ +122,5 @@ > > + // Resets the operating system's timeout for when to disable the screen. > > + // Called periodically to keep the screensaver off. > > + void ResetScreenSaverTimeout() { > > + if (SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, 0, &mScreenSaverTimeout, 0)) { > > + SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT, mScreenSaverTimeout, NULL, 0); > > Where did you find this trick? In the comments of the MSDN article on SetThreadExecutionState(): https://msdn.microsoft.com/en-us/library/windows/desktop/aa373208%28v=vs.85%29.aspx Was mentioned in some stackoverflow threads too.
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/96eeff9fec80
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Assignee | ||
Comment 10•9 years ago
|
||
Comment on attachment 8677866 [details] [diff] [review] Patch: Use SystemParametersInfo to block screen saver Approval Request Comment [Feature/regressing bug #]: Video playback/YouTube on Win Vista and XP [User impact if declined]: On WinXP and Vista, when video is playing the screen saver can engage, interrupting viewing pleasure; we currently disable the screen saver on other Windows versions. [Describe test coverage new/current, TreeHerder]: We don't have a screen saver test; it's hard to test. [Risks and why]: Low; we do an extra thing to what we already do, so shouldn't break existing screen saver disabling on other Windows versions. [String/UUID change made/needed]: None.
Attachment #8677866 -
Flags: approval-mozilla-beta?
Updated•9 years ago
|
status-firefox43:
--- → affected
Comment 11•9 years ago
|
||
Comment on attachment 8677866 [details] [diff] [review] Patch: Use SystemParametersInfo to block screen saver Good for user experience, let's take this in beta. Not a lot of test coverage so we should verify the fix manually.
Attachment #8677866 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Updated•9 years ago
|
Flags: qe-verify+
Assignee | ||
Comment 12•9 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/fabe9ce33dc2
Comment 13•9 years ago
|
||
I was able to reproduce this issue on Firefox 42.0a1 (2015-08-11) using Windows Xp 64-bit. Verified fixed on Firefox 44.0a2 (2015-11-16) and Firefox 43 beta 3 (20151112144305) under Windows Xp 64-bit and Windows Vista 32-bit.
Assignee | ||
Comment 14•9 years ago
|
||
Release Note Request (optional, but appreciated) [Why is this notable]: Fixes what is probably a very annoying behaviour for Firefox on WinXP/Vista. [Suggested wording]: Screensaver is temporarily disabled on Windows XP and Vista when playing HTML5 video. [Links (documentation, blog post, etc)]:
relnote-firefox:
--- → ?
Added to Beta44 release notes.
You need to log in
before you can comment on or make changes to this bug.
Description
•