devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d2d4fcce48504a317d99e06fddc9db5cdbd7c67a

commit d2d4fcce48504a317d99e06fddc9db5cdbd7c67a
Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Sep 26 11:23:24 2019 -0400

    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
---
 src/lib/ecore_x/ecore_x.c | 4 ++++
 1 file changed, 4 insertions(+)

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

-- 


Reply via email to