summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_x/xlib
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-08-26 15:34:40 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-08-26 15:34:40 +0000
commit3faee27bd87d56814cb657e94146eb4b8b7fde55 (patch)
tree2d0e6d84ec2e110aa0a5070c98fea09e366c9788 /legacy/ecore/src/lib/ecore_x/xlib
parent3b197e9a545c4ecb9486390a3f3a4408749deb0e (diff)
add in custom screen blank enable/disable in ecore-x so we can do e17
based on this release of efl. SVN revision: 75714
Diffstat (limited to 'legacy/ecore/src/lib/ecore_x/xlib')
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c3
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c33
2 files changed, 34 insertions, 2 deletions
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
index 9d01793..7d685cf 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
@@ -2007,7 +2007,8 @@ _ecore_x_event_handle_screensaver_notify(XEvent *xevent)
2007 return; 2007 return;
2008 2008
2009 e->win = screensaver_event->window; 2009 e->win = screensaver_event->window;
2010 if (screensaver_event->state == ScreenSaverOn) 2010 if ((screensaver_event->state == ScreenSaverOn) ||
2011 (screensaver_event->state == ScreenSaverCycle))
2011 e->on = EINA_TRUE; 2012 e->on = EINA_TRUE;
2012 else 2013 else
2013 e->on = EINA_FALSE; 2014 e->on = EINA_FALSE;
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c
index 40dd738..3688a44 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c
@@ -162,7 +162,8 @@ ecore_x_screensaver_event_listen_set(Eina_Bool on)
162 LOGFN(__FILE__, __LINE__, __FUNCTION__); 162 LOGFN(__FILE__, __LINE__, __FUNCTION__);
163 root = DefaultRootWindow(_ecore_x_disp); 163 root = DefaultRootWindow(_ecore_x_disp);
164 if (on) 164 if (on)
165 XScreenSaverSelectInput(_ecore_x_disp, root, ScreenSaverNotifyMask); 165 XScreenSaverSelectInput(_ecore_x_disp, root,
166 ScreenSaverNotifyMask | ScreenSaverCycle);
166 else 167 else
167 XScreenSaverSelectInput(_ecore_x_disp, root, 0); 168 XScreenSaverSelectInput(_ecore_x_disp, root, 0);
168#else 169#else
@@ -171,3 +172,33 @@ ecore_x_screensaver_event_listen_set(Eina_Bool on)
171#endif /* ifdef ECORE_XSS */ 172#endif /* ifdef ECORE_XSS */
172} 173}
173 174
175
176EAPI Eina_Bool
177ecore_x_screensaver_custom_blanking_enable(void)
178{
179#ifdef ECORE_XSS
180 XSetWindowAttributes attr;
181
182 XScreenSaverSetAttributes(_ecore_x_disp,
183 DefaultRootWindow(_ecore_x_disp),
184 -9999, -9999, 1, 1, 0,
185 CopyFromParent, InputOnly, CopyFromParent,
186 0, &attr);
187 return EINA_TRUE;
188#else
189 return EINA_FALSE;
190#endif /* ifdef ECORE_XSS */
191}
192
193EAPI Eina_Bool
194ecore_x_screensaver_custom_blanking_disable(void)
195{
196#ifdef ECORE_XSS
197 XScreenSaverUnsetAttributes(_ecore_x_disp,
198 DefaultRootWindow(_ecore_x_disp));
199 return EINA_TRUE;
200#else
201 return EINA_FALSE;
202#endif /* ifdef ECORE_XSS */
203}
204