summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-09-26 11:23:24 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-04 09:54:06 -0400
commit60687672432e6a9d361a41755d646015ca60f036 (patch)
tree2372736ec12b4e77bfed83736bc14fabde930503
parent49a22224fa5c0225e5d0113fffd9c2d26349a4de (diff)
downloadefl-60687672432e6a9d361a41755d646015ca60f036.tar.gz
ecore-x: protect against accidentally "un-managing" the root window
Summary: block calls to XSelectInput with the root window if the root window is currently being "managed" in-process in order to avoid breaking the running wm Depends on D10013 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10014
-rw-r--r--src/lib/ecore_x/ecore_x.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c
index 72ccfc2481..c612d64387 100644
--- a/src/lib/ecore_x/ecore_x.c
+++ b/src/lib/ecore_x/ecore_x.c
@@ -1394,6 +1394,7 @@ EAPI void
ecore_x_window_container_manage(Ecore_X_Window win)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (_ecore_x_window_manage_succeeded && (win == ecore_x_window_root_first_get())) return;
EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
XSelectInput(_ecore_x_disp, win,
SubstructureRedirectMask |
@@ -1406,6 +1407,7 @@ ecore_x_window_client_manage(Ecore_X_Window win)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
+ if (_ecore_x_window_manage_succeeded && (win == ecore_x_window_root_first_get())) return;
XSelectInput(_ecore_x_disp, win,
PropertyChangeMask |
// ResizeRedirectMask |
@@ -1425,6 +1427,7 @@ ecore_x_window_sniff(Ecore_X_Window win)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
+ if (_ecore_x_window_manage_succeeded && (win == ecore_x_window_root_first_get())) return;
XSelectInput(_ecore_x_disp, win,
PropertyChangeMask |
SubstructureNotifyMask);
@@ -1446,6 +1449,7 @@ EAPI void
ecore_x_window_client_sniff(Ecore_X_Window win)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (_ecore_x_window_manage_succeeded && (win == ecore_x_window_root_first_get())) return;
EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
XSelectInput(_ecore_x_disp, win,
PropertyChangeMask |