Re: macdrv: implement getting and setting the screen saver state, version 6

2013-01-22 Thread Ken Thomases
On Jan 22, 2013, at 5:33 PM, C.W. Betts wrote: > Yet another fix. Looks good to me. Thanks for doing this and for putting up with me. Cheers, Ken

Re: macdrv: implement getting and setting the screen saver state. if(Style)

2013-01-22 Thread Ken Thomases
On Jan 22, 2013, at 6:38 AM, wrote: > Ken Thomases wrote: >>> +if(success != kIOReturnSuccess) >> Another style nitpick: please put a space between "if" and the condition. >> That applies to the "if(count2)" above, too. > > I find this over the top. Well, I phrased it as a

Re: macdrv: implement getting and setting the screen saver state, version 5

2013-01-22 Thread Ken Thomases
On Jan 22, 2013, at 12:22 PM, C.W. Betts wrote: > This version should fix the problems you mentioned Sorry about this – I should have thought about this last time – but I think you shouldn't fall through in the SPI_SETSCREENSAVEACTIVE case. It's asking for trouble in the future, if anybody add

Re: macdrv: implement getting and setting the screen saver state. if(Style)

2013-01-22 Thread Christian Costa
Well, 'grep "if(" * -r | wc -l' and 'grep "if (" * -r | wc -l'. :) 2013/1/22 Bruno Jesus <00cp...@gmail.com>: > Out of curiosity can you explain the shell wizardry you used to get the > stats? > > Thanks, > Bruno > > > On Tue, Jan 22, 2013 at 10:52 AM, Christian Costa > wrote: >> >> 2013/1/22 :

Re: macdrv: implement getting and setting the screen saver state. if(Style)

2013-01-22 Thread Christian Costa
2013/1/22 : > Hi, > > Ken Thomases wrote: >>> +if(success != kIOReturnSuccess) >>Another style nitpick: please put a space between "if" and the condition. >> That applies to the "if(count2)" above, too. > > I find this over the top. Where is the rule? > Andrew Eikum's mmdevap

macdrv: implement getting and setting the screen saver state. if(Style)

2013-01-22 Thread Joerg-Cyril.Hoehle
Hi, Ken Thomases wrote: >> +if(success != kIOReturnSuccess) >Another style nitpick: please put a space between "if" and the condition. > That applies to the "if(count2)" above, too. I find this over the top. Where is the rule? Andrew Eikum's mmdevapi code -- which I don't co

Re: macdrv: implement getting and setting the screen saver state, version 4

2013-01-21 Thread Ken Thomases
Hi, On Jan 21, 2013, at 6:21 PM, C.W. Betts wrote: > This version falls through in SPI_SETSCREENSAVEACTIVE. Sadly, you used C++ style for the fall-through comment. :-/ Also, you have some trailing whitespace and the patch no longer applies cleanly after today's commits of mine. It should be e

Re: macdrv: implement getting and setting the screen saver state, version 3

2013-01-21 Thread Ken Thomases
On Jan 21, 2013, at 11:50 AM, C.W. Betts wrote: > This version gets rid of redundant comments. According to Alexandre's comment on your X11 driver patch, you should be returning FALSE from the "SET" case so that user32 will update the registry. Otherwise, looking good. -Ken

Re: macdrv: implement getting and setting the screen saver state, version 2

2013-01-21 Thread Ken Thomases
On Jan 21, 2013, at 9:31 AM, C.W. Betts wrote: > On Jan 20, 2013, at 11:06 PM, Ken Thomases wrote: > >> I'm not sure it's correct that these are two different names for roughly the >> same thing. I think the two assertion types do slightly different things. >> "NoDisplaySleep" seeks to preve

Re: macdrv: implement getting and setting the screen saver state, version 2

2013-01-21 Thread C.W. Betts
On Jan 20, 2013, at 11:06 PM, Ken Thomases wrote: > Hi, > > On Jan 20, 2013, at 2:00 PM, C.W. Betts wrote: > >> This version implements changes and advice from Ken Thomases, including >> using kIOPMAssertionTypePreventUserIdleDisplaySleep on Lion and later. Also, >> some comments were added.

Re: macdrv: implement getting and setting the screen saver state, version 2

2013-01-20 Thread Ken Thomases
Hi, On Jan 20, 2013, at 2:00 PM, C.W. Betts wrote: > This version implements changes and advice from Ken Thomases, including using > kIOPMAssertionTypePreventUserIdleDisplaySleep on Lion and later. Also, some > comments were added. > +//Get pre-Lion no display sleep counts

Re: macdrv: implement getting and setting the screen saver state.

2013-01-20 Thread Ken Thomases
On Jan 20, 2013, at 11:47 AM, C.W. Betts wrote: > On Jan 20, 2013, at 12:38 AM, Ken Thomases wrote: > >> On Jan 19, 2013, at 4:08 PM, C.W. Betts wrote: >> >>> +CFNumberRef count = >>> CFDictionaryGetValue(assertsionStats, kIOPMAssertionTypeNoDisplaySleep); >>> +

Re: macdrv: implement getting and setting the screen saver state.

2013-01-20 Thread C.W. Betts
On Jan 20, 2013, at 12:38 AM, Ken Thomases wrote: > Hi, > > On Jan 19, 2013, at 4:08 PM, C.W. Betts wrote: > >> This implements getting and setting the screen saver state on the Mac Wine >> driver. > > Thanks for your contribution to the Mac driver. There are some issues with > the patch:

Re: macdrv: implement getting and setting the screen saver state.

2013-01-19 Thread Ken Thomases
Hi, On Jan 19, 2013, at 4:08 PM, C.W. Betts wrote: > This implements getting and setting the screen saver state on the Mac Wine > driver. Thanks for your contribution to the Mac driver. There are some issues with the patch: > +CFDictionaryRef assertsionStats = NULL; That va