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
This commit is contained in:
Mike Blumenkrantz 2019-09-26 11:23:24 -04:00 committed by Christopher Michael
parent 2f7b359183
commit d2d4fcce48
1 changed files with 4 additions and 0 deletions

View File

@ -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 |