e comp: fix crashes on exit/restart when e_comp is NULL
when we are shutting down i seem to get into a state where e_comp is null yet we are still processing events. this fixes that and checks.
This commit is contained in:
parent
b9c45c6159
commit
26a7ba3a58
|
@ -1574,6 +1574,7 @@ e_comp_block_window_del(void)
|
||||||
E_API E_Comp *
|
E_API E_Comp *
|
||||||
e_comp_find_by_window(Ecore_Window win)
|
e_comp_find_by_window(Ecore_Window win)
|
||||||
{
|
{
|
||||||
|
if (!e_comp) return NULL;
|
||||||
if ((e_comp->win == win) || (e_comp->ee_win == win) || (e_comp->root == win)) return e_comp;
|
if ((e_comp->win == win) || (e_comp->ee_win == win) || (e_comp->root == win)) return e_comp;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1238,6 +1238,7 @@ _e_comp_x_show_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Eve
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
|
|
||||||
//INF("X SHOW REQ: %u", ev->win);
|
//INF("X SHOW REQ: %u", ev->win);
|
||||||
|
if (!e_comp) return ECORE_CALLBACK_RENEW;
|
||||||
ec = _e_comp_x_client_find_by_window(ev->win);
|
ec = _e_comp_x_client_find_by_window(ev->win);
|
||||||
if (e_comp_ignore_win_find(ev->win) ||
|
if (e_comp_ignore_win_find(ev->win) ||
|
||||||
(ec && (ec->ignored || ec->override)) ||
|
(ec && (ec->ignored || ec->override)) ||
|
||||||
|
@ -2210,6 +2211,7 @@ _e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
|
|
||||||
|
if (!e_comp) return ECORE_CALLBACK_RENEW;
|
||||||
if (_e_comp_x_mapping_change_disabled) return ECORE_CALLBACK_RENEW;
|
if (_e_comp_x_mapping_change_disabled) return ECORE_CALLBACK_RENEW;
|
||||||
e_comp_canvas_keys_ungrab();
|
e_comp_canvas_keys_ungrab();
|
||||||
EINA_LIST_FOREACH(e_comp->clients, l, ec)
|
EINA_LIST_FOREACH(e_comp->clients, l, ec)
|
||||||
|
@ -2241,6 +2243,7 @@ _e_comp_x_mouse_in(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_M
|
||||||
{
|
{
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
|
|
||||||
|
if (!e_comp) return ECORE_CALLBACK_RENEW;
|
||||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
||||||
ec = _e_comp_x_client_find_by_window(ev->win);
|
ec = _e_comp_x_client_find_by_window(ev->win);
|
||||||
if (!ec) return ECORE_CALLBACK_RENEW;
|
if (!ec) return ECORE_CALLBACK_RENEW;
|
||||||
|
@ -2269,6 +2272,7 @@ _e_comp_x_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_
|
||||||
{
|
{
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
|
|
||||||
|
if (!e_comp) return ECORE_CALLBACK_RENEW;
|
||||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
||||||
if ((ev->mode == ECORE_X_EVENT_MODE_UNGRAB) &&
|
if ((ev->mode == ECORE_X_EVENT_MODE_UNGRAB) &&
|
||||||
(ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR))
|
(ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR))
|
||||||
|
@ -2292,6 +2296,7 @@ _e_comp_x_mouse_wheel(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
E_Binding_Event_Wheel ev2;
|
E_Binding_Event_Wheel ev2;
|
||||||
|
|
||||||
|
if (!e_comp) return ECORE_CALLBACK_RENEW;
|
||||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
||||||
//if (action_input_win)
|
//if (action_input_win)
|
||||||
//ec = action_border;
|
//ec = action_border;
|
||||||
|
@ -2315,6 +2320,7 @@ _e_comp_x_mouse_up(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_But
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
E_Binding_Event_Mouse_Button ev2;
|
E_Binding_Event_Mouse_Button ev2;
|
||||||
|
|
||||||
|
if (!e_comp) return ECORE_CALLBACK_RENEW;
|
||||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
||||||
//if (action_input_win)
|
//if (action_input_win)
|
||||||
//ec = action_border;
|
//ec = action_border;
|
||||||
|
@ -2343,6 +2349,7 @@ _e_comp_x_mouse_down(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_B
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
E_Binding_Event_Mouse_Button ev2;
|
E_Binding_Event_Mouse_Button ev2;
|
||||||
|
|
||||||
|
if (!e_comp) return ECORE_CALLBACK_RENEW;
|
||||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
||||||
if (e_client_action_get()) return ECORE_CALLBACK_RENEW; //block extra mouse buttons during action
|
if (e_client_action_get()) return ECORE_CALLBACK_RENEW; //block extra mouse buttons during action
|
||||||
//if (action_input_win)
|
//if (action_input_win)
|
||||||
|
@ -2365,6 +2372,7 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_M
|
||||||
{
|
{
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
|
|
||||||
|
if (!e_comp) return ECORE_CALLBACK_RENEW;
|
||||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return ECORE_CALLBACK_RENEW;
|
||||||
ec = e_client_action_get();
|
ec = e_client_action_get();
|
||||||
if (!ec)
|
if (!ec)
|
||||||
|
|
Loading…
Reference in New Issue