Closed Bug 679733 Opened 13 years ago Closed 13 years ago

Widget Qt should send system notifications (display, taskswitcher, flight modes)

Categories

(Core Graveyard :: Widget: Qt, defect)

ARM
Maemo
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla9

People

(Reporter: romaxa, Assigned: romaxa)

References

Details

Attachments

(2 files, 3 obsolete files)

We need to listen qmsystem2 (in future QtMobility API) for displayState, Activity, device mode notifications and generate related observer notifications.
I've reused old notification states from maemo5, and added ts-background, ts-foreground notifications which notify us when browser goes into taskswitcher mode (in that case we should make last active tab/docshell inactive)
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #553792 - Flags: feedback?(azakai)
Comment on attachment 553792 [details] [diff] [review]
Listen device system states and send observe notifications

if you have better observe name than "ts-background", otherwise it good to go as system part
Attachment #553792 - Flags: review?(doug.turner)
Who for example would be listening to these notifications?
1) ts-background/foreground - right now when fennec moved to background, top fennec docshell is staying active, and we should add listener possibly in fennec UI or in DocShell and set current visible tab as inactive (that should cause animations suspend et.c.)

2) As an option we can completely suspend child process when fennec goes to taskswitcher in order to suspend all possible JS activity on page.

3) system-active/inactive - practically fennec child process should be suspended

2-3) suspension can be canceled in case if there are some audio activity on the page...
Here is example which is deactivating last selected tab when fennec goes into background or system go to locked/inactive state or when display is off...
Attachment #553942 - Flags: feedback?(azakai)
Comment on attachment 553942 [details] [diff] [review]
Deactivate last visible tab when fennec go into bg, or system inactive

new bug created for this implementation
Attachment #553942 - Flags: feedback?(azakai)
Another example is suspend child process by hard (SIGSTOP) but only if it is not playing any audio stuff (case with lastfm et.c.)

And feedback on this?
Attachment #553942 - Attachment is obsolete: true
Attachment #553973 - Flags: feedback?
Attachment #553792 - Flags: feedback+
Attachment #553792 - Flags: feedback?(azakai) → feedback+
(In reply to Oleg Romashin (:romaxa) from comment #7)
> Created attachment 553973 [details] [diff] [review]
> Child process suspend/resume API (SIGSTOP/SIGCONT)
> 
> Another example is suspend child process by hard (SIGSTOP) but only if it is
> not playing any audio stuff (case with lastfm et.c.)
> 
> And feedback on this?

There was opposition to this when we considered it last year, due to a lot of potential problems with it. It can probably be done, but is risky - probably better to figure out why we need to suspend the child and fix that problem (are there unnecessary timers, etc.).
> There was opposition to this when we considered it last year, due to a lot
> of potential problems with it. It can probably be done, but is risky -
> probably better to figure out why we need to suspend the child and fix that
> problem (are there unnecessary timers, etc.).

Practically this is short term fix for all timers in content process (Page JS mostly).

Possibly more elegant fix for that is to call Window->Suspend/Resume timeouts, that suspend all JS timers.

For me both ways are having + and -
SIGSTOP:
 + will not cause some conflicts in content process caused by components which are trying to use/create JS timers and those are not working.
 - May cause some undiscovered problems of Fenenc which is trying to interact with STOPPED child process

JS Suspend/Resume timeouts:
 + Keep child process in alive state, helps to catch other timers for long term fixing
 + problem described in SIGSTOP as "+" here is minus... such pages like gmail intentionally broken after such suspend..
Comment on attachment 553792 [details] [diff] [review]
Listen device system states and send observe notifications

please adjust the copyright date.
Attachment #553792 - Flags: review?(doug.turner) → review+
Comment on attachment 553973 [details] [diff] [review]
Child process suspend/resume API (SIGSTOP/SIGCONT)

please put this in a different bug (one fix per bug).
Attachment #553973 - Flags: feedback? → feedback-
this was example of possible usage
> please put this in a different bug (one fix per bug).
will do that next
Attachment #553973 - Attachment is obsolete: true
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/fb72354db342
Flags: in-testsuite-
Target Milestone: --- → mozilla9
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/b51e7241dd13
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
This patch does not make big sense without 679923
Depends on: 679923
Comment on attachment 554737 [details] [diff] [review]
[TOPUSH] Listen device system states and send observe notifications, fixed copyright

This patch is needed as backend for bug 679923, affecting only Qt Maemo6 port, more details about whole change is in https://bugzilla.mozilla.org/show_bug.cgi?id=679923#c37
Attachment #554737 - Flags: approval-mozilla-aurora?
Comment on attachment 554737 [details] [diff] [review]
[TOPUSH] Listen device system states and send observe notifications, fixed copyright

Leaving in fx9.
Attachment #554737 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: