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
This commit is contained in:
Cedric Bail 2019-10-31 09:17:53 -04:00 committed by Mike Blumenkrantz
parent e502da8345
commit 9852e6cabc
1 changed files with 3 additions and 2 deletions

View File

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