On Sat, 18 Jun 2011 13:15:36 +0200 Mathieu Taillefumier <[email protected]> said:
> On 06/18/2011 02:15 AM, Carsten Haitzler (The Rasterman) wrote: > > On Fri, 17 Jun 2011 22:50:33 +0200 Mathieu Taillefumier > > <[email protected]> said: > > > >> On 06/17/2011 10:37 PM, Christopher Michael wrote: > >>> On 06/17/2011 04:35 PM, Mathieu Taillefumier wrote: > >>>> On 06/17/2011 10:27 PM, Christopher Michael wrote: > >>>>> On 06/17/2011 03:55 PM, Mathieu Taillefumier wrote: > >>>>>> Hi, > >>>>>> > >>>>>> I finished to write the code implementing the automatic backlight > >>>>>> reduction after a given time of inactivity (that can be set in the > >>>>>> backlight menu). The patch is relatively straightforward but reviewing > >>>>>> is always welcome so fire up. To have the automatic backlight just set > >>>>>> the Dimming time to a non zero value. The automatic dimming is disabled > >>>>>> when the dimming time is 0. > >>>>>> > >>>>>> > >>>>>> Mathieu > >>>>>> > >>>>> Just one observation wrt this patch. The formatting for 'if' statements > >>>>> is not correct. It should be something like this: > >>>>> > >>>>> if (_bl_log_dom< 0) > >>>>> > >>>>> with a space after the 'if'. > >>>> > >>>> And !!! Corrected but it does not improve it. > >>>> > >>>> Mathieu > >>>>> > >>> > >>> Hmm, I still see several 'if' statements that are not corrected ;) and > >>> Yes, it will not change functionality of the patch, but does improve > >>> readability if it matches the rest of the EFL ;) > >> Well thank anyway, I should follow the rules that's all ;-). Enclosed > >> the last version of the patch that I hope contains all the "if" > >> correctly formatted :-). > > > > poller? every 4 ticks (0.5 sec) ? ouch! > > Originally I wanted to use timers for that but after some discussion > someone suggested me to use polling timers (I defined it at 0.5 s > because I did not like to wait two seconds before the backlight was back > to normal). However I do not understand why it should be avoided ? :-( power management. the cpu is less likely to go into low port and idle state. it actually has a significant impact on battery life etc. if you keep polling. > > > > what you REALLY want is to use the screensaver notify event. this will: > > > > 1. notify you WHEN screensaver stops (when there was activity), and so you > > return backlight to normal state when this happens > > 2. notify you when screensaver starts. this is the time to go into dim mode. > > its ALSO when the screensaver may begin. so we need to double up using > > screensaver as dimming notification. polling is not that great a thing to > > do. avoid if you can. > > > > I see one problem with this method. The backlight intensity will only be > reduced when the screensaver will turn on and will be back to normal > when it is off. However these events can occur after many minutes of > inactivity. What I wish to do is to actually reduce the backlight to > idle mode (after 10 s for instance) independently of the screensaver > option, that is why I used polling in my code. set screensaver timeout to 10s. can be done. :) you will have to take over screensaver functionality instead of blanking or putting up screensaver window/anim/image, you dim. then add a timer to actually put up real screensaver image (lock and so on or blank) some time later. as such the timer is ok as it ticks off only once - when the timeout from the screensaver start is reached with NO user activity. any exit from screensaver mode would undim and cancel the timer. -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
