Closed Bug 414596 Opened 14 years ago Closed 14 years ago

Implement nsIdleServiceOS2


(Core Graveyard :: Widget: OS/2, defect)

Not set


(Not tracked)



(Reporter: mozilla, Assigned: mozilla)



(1 file)

Just filing this bug because I see lots of 
   WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040154:
   file <path>/toolkit/components/places/src/nsNavHistory.cpp, line 3877
in a Firefox debug build.

nsIIdleService was implemented for Win and Linux in bug 343416 and for Mac in bug 367658, about a year ago and we didn't notice this to implement it on OS/2. I don't think there is an API to do this on OS/2 but perhaps we can try to ask some screensaver (like Doodle's?) like it's done for Linux (where xscreensaver is asked if present).
Attached patch v1Splinter Review
OK, so Doodle added a function (SSCore_GetInactivityTime) for this in his upcoming DSSaver v1.80. With that it works nicely. I find it somewhat annoying that such functionality isn't available on a bare OS/2 system (or did I just not look long enough). But as this patch dynamically checks for that, I guess we are safe.
Assignee: mozilla → mozilla
Attachment #302899 - Flags: review?(mozilla)
Comment on attachment 302899 [details] [diff] [review]

Couldn't we implement whatever code he wrote in Firefox?
Attachment #302899 - Flags: review?(mozilla) → review+
Mike, yes, we could implement that in principle. Not sure I care enough to do that, though... As far as I understand nothing it really broken when nsIdleService doesn't initialize or GetIdleTime returns a failure.

[In any case, Doodle says it's done using hooks, i.e. WinSetHook(), which is used to watch WM_CHAR and WM_MOUSE* messages. Actually, there are EDM/2 articles on that topic that might help:
If we hope to track the messages from the whole system, the code has to end up in a DLL (which I think is true for all Mozilla apps on trunk). Otherwise we would probably only track inactivity time in the app itself.]
Yeah, let's definitely not do this then.

I think we should list his code as a "recommended download" as well as Rich Walsh's
Yes, we'll update README.txt with a pointer to DSSaver (bug 381331) and when we have FF 3.0 final we can update the webpage accordingly.

Patch checked in to trunk.
Closed: 14 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.