zmike pushed a commit to branch master.

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

commit 9852e6cabc529e2f4bcb2863c13d1309c75327c8
Author: Cedric Bail <cedric.b...@free.fr>
Date:   Thu Oct 31 09:17:53 2019 -0400

    elementary: handle case when XFIXES is not available.
    
    Summary:
    ECORE_X_EVENT_FIXES_SELECTION_NOTIFY is only initialized when XFIXES
    is available. If ecore_event_handler_add is called with type == 0, it
    will trigger an abort and elementary would not initialize properly.
    
    Depends on D10491
    
    Reviewers: zmike, raster, bu5hm4n, Hermet
    
    Reviewed By: zmike
    
    Subscribers: #reviewers, #committers
    
    Tags: #efl
    
    Maniphest Tasks: T8321
    
    Differential Revision: https://phab.enlightenment.org/D10492
---
 src/lib/elementary/efl_ui_selection_manager.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_selection_manager.c 
b/src/lib/elementary/efl_ui_selection_manager.c
index 3c8ab8d9ab..3a5db9713c 100644
--- a/src/lib/elementary/efl_ui_selection_manager.c
+++ b/src/lib/elementary/efl_ui_selection_manager.c
@@ -5475,8 +5475,9 @@ _efl_ui_selection_manager_efl_object_constructor(Eo *obj, 
Efl_Ui_Selection_Manag
                                                      
_efl_sel_manager_x11_selection_notify, pd);
         pd->clear_handler = 
ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR,
                                                     _x11_selection_clear, pd);
-        pd->fix_handler = 
ecore_event_handler_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY,
-                                                  _x11_fixes_selection_notify, 
pd);
+        if (ECORE_X_EVENT_FIXES_SELECTION_NOTIFY) // If XFIXES is not 
available ECORE_X_EVENT_FIXES_SELECTION_NOTIFY would be NULL
+          pd->fix_handler = 
ecore_event_handler_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY,
+                                                    
_x11_fixes_selection_notify, pd);
      }
 #endif
 

-- 


Reply via email to