Last Comment Bug 700643 - Windows power management messages shouldn't rely on hidden window
: Windows power management messages shouldn't rely on hidden window
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla11
Assigned To: Neil Deakin
:
Mentors:
Depends on:
Blocks: 71895
  Show dependency treegraph
 
Reported: 2011-11-08 06:01 PST by Neil Deakin
Modified: 2012-03-04 20:01 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.38 KB, patch)
2011-11-08 06:01 PST, Neil Deakin
jmathies: review+
Details | Diff | Review

Description Neil Deakin 2011-11-08 06:01:40 PST
Created attachment 572793 [details] [diff] [review]
patch

Instead, use a global to store what messages have been sent.

As an aside, the documentation for WM_POWERBROADCAST says that several messages with different PBT_APMRESUME* values for wParam can be sent in sequence, which implies the existing code could send multiple notifications. Using a global also prevents this.

I'm using a virtual machine and am not sure how to test any of this.
Comment 1 Jim Mathies [:jimm] 2011-11-08 07:12:10 PST
Side note, I'm working on a stand alone service that listens for these and supports observer events and a simple callback mechanism for bug 679240. I plan to move the code for this out of widget. (There's win and mac code currently that can be moved.)
Comment 2 Marco Bonardo [::mak] 2011-11-09 05:28:03 PST
https://hg.mozilla.org/mozilla-central/rev/53a4a92228f8

Note You need to log in before you can comment on or make changes to this bug.