On 01/10/12 07:39, Sebastian Dransfeld wrote: > On 09/30/2012 11:30 AM, Tomas Cech wrote: >> Hi, >> >> I have strong feeling that this was introduced by commit 76342 >> (raster). >> >> I'm preparing pillory. > > In combination with this: > > ecore_x_screensaver.c: > XScreenSaverSelectInput(_ecore_x_disp, root, > ScreenSaverNotifyMask | ScreenSaverCycle); > > Shouldn't the mask be ScreenSaverNotify? Else the handler in E sucks. > > (Same code in xcb) > > S. >
From the man page: XScreenSaverSelectInput asks that events related to the screen saver be generated for this client. If no bits are set in event-mask, then no events will be generated. Otherwise, any combination of the following bits may be set: ScreenSaverNotify If this bit is set, ScreenSaverNotify events are generated whenever the screen saver is activated or deactivated. ScreenSaverCycle If this bit is set, ScreenSaverNotify events are generated whenever the screen saver cycle interval passes. So yes, I think you are correct wrt the mask for SelectInput. If we do the Cycle mask, then that explains why the handler is getting called so often (when the screensaver timeout is short). I do believe that the intended usage for ecore_x_screensaver_event_listen_set is that we want to be notified when the screensaver activates (or deactivates). If that is indeed the case, then we can remove the ScreenSaverCycle mask and just use the NotifyMask. dh ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel