ecore-x: add internal function for selecting just properties of root window
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 26 Sep 2019 15:23:12 +0000 (11:23 -0400)
committerJongmin Lee <jm105.lee@samsung.com>
Thu, 26 Sep 2019 21:39:04 +0000 (06:39 +0900)
Summary:
this is just a shortcut for watching properties in the case where no wm is
active in the process
Depends on D10012

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10013

src/lib/ecore_x/ecore_x.c
src/lib/ecore_x/ecore_x_private.h

index 8503add..924b416 100644 (file)
@@ -1431,6 +1431,17 @@ ecore_x_window_sniff(Ecore_X_Window win)
    if (_ecore_xlib_sync) ecore_x_sync();
 }
 
+/* this is internal-only for now */
+EAPI void
+ecore_x_window_root_properties_select(void)
+{
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   if (_ecore_x_window_manage_succeeded) return;
+   EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
+   XSelectInput(_ecore_x_disp, ecore_x_window_root_first_get(), PropertyChangeMask);
+   if (_ecore_xlib_sync) ecore_x_sync();
+}
+
 EAPI void
 ecore_x_window_client_sniff(Ecore_X_Window win)
 {
index 7374a0d..ce81efe 100644 (file)
@@ -406,4 +406,24 @@ int _ecore_x_shutdown(void);
 #define LOGFN(fl, ln, fn)
 #endif /* ifdef LOGFNS */
 
+
+
+#ifdef EAPI
+# undef EAPI
+#endif // ifdef EAPI
+
+#ifdef __GNUC__
+# if __GNUC__ >= 4
+#  define EAPI __attribute__ ((visibility("default")))
+# else // if __GNUC__ >= 4
+#  define EAPI
+# endif // if __GNUC__ >= 4
+#else // ifdef __GNUC__
+# define EAPI
+#endif // ifdef __GNUC__
+EAPI void ecore_x_window_root_properties_select(void);
+#undef EAPI
+#define EAPI
+
+
 #endif /* ifndef _ECORE_X_PRIVATE_H */