Comment 73 for bug 434476

Revision history for this message
In , Justin-lebar+bug (justin-lebar+bug) wrote :

> So how we can get notification about the "screen" wake lock you're talking about in Bug
> 827756?

I'm not sure the screen wake lock is what you want here, though, since in its current form, any page can acquire the "screen" wake lock and keep the screensaver from appearing.

I think you want a /trusted/ wake lock coming from Gecko, which is not a concept which currently exists in the API. I think I'd support adding something like that, if someone wanted to implement it.

Anywho, to answer your question, if you just replace

> + if(!topic.Equals(NS_LITERAL_STRING("DOM_Fullscreen")))

with "screen", you'll listen for the "screen" wake lock. At least, if I follow the code correctly (it's a bit tricky for me to follow since I'm not familiar with the dbus stuff).