summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-09-26 11:23:24 -0400
committerChristopher Michael <cp.michael@samsung.com>2019-09-26 11:23:24 -0400
commitd2d4fcce48504a317d99e06fddc9db5cdbd7c67a (patch)
tree94c9998d88c5ac07354670fbb60c1e40333ca571
parent2f7b359183a2dd7631c669583d0038fe840bc929 (diff)
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 924b416ebb..a32f42f641 100644
--- a/src/lib/ecore_x/ecore_x.c
+++ b/src/lib/ecore_x/ecore_x.c
@@ -1394,6 +1394,7 @@ EAPI void
1394ecore_x_window_container_manage(Ecore_X_Window win) 1394ecore_x_window_container_manage(Ecore_X_Window win)
1395{ 1395{
1396 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1396 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1397 if (_ecore_x_window_manage_succeeded && (win == ecore_x_window_root_first_get())) return;
1397 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); 1398 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
1398 XSelectInput(_ecore_x_disp, win, 1399 XSelectInput(_ecore_x_disp, win,
1399 SubstructureRedirectMask | 1400 SubstructureRedirectMask |
@@ -1406,6 +1407,7 @@ ecore_x_window_client_manage(Ecore_X_Window win)
1406{ 1407{
1407 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1408 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1408 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); 1409 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
1410 if (_ecore_x_window_manage_succeeded && (win == ecore_x_window_root_first_get())) return;
1409 XSelectInput(_ecore_x_disp, win, 1411 XSelectInput(_ecore_x_disp, win,
1410 PropertyChangeMask | 1412 PropertyChangeMask |
1411// ResizeRedirectMask | 1413// ResizeRedirectMask |
@@ -1425,6 +1427,7 @@ ecore_x_window_sniff(Ecore_X_Window win)
1425{ 1427{
1426 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1428 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1427 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); 1429 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
1430 if (_ecore_x_window_manage_succeeded && (win == ecore_x_window_root_first_get())) return;
1428 XSelectInput(_ecore_x_disp, win, 1431 XSelectInput(_ecore_x_disp, win,
1429 PropertyChangeMask | 1432 PropertyChangeMask |
1430 SubstructureNotifyMask); 1433 SubstructureNotifyMask);
@@ -1446,6 +1449,7 @@ EAPI void
1446ecore_x_window_client_sniff(Ecore_X_Window win) 1449ecore_x_window_client_sniff(Ecore_X_Window win)
1447{ 1450{
1448 LOGFN(__FILE__, __LINE__, __FUNCTION__); 1451 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1452 if (_ecore_x_window_manage_succeeded && (win == ecore_x_window_root_first_get())) return;
1449 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); 1453 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
1450 XSelectInput(_ecore_x_disp, win, 1454 XSelectInput(_ecore_x_disp, win,
1451 PropertyChangeMask | 1455 PropertyChangeMask |