further protect against crashes when xwayland crashes

This commit is contained in:
Mike Blumenkrantz 2018-01-22 16:51:40 -05:00
parent 0e53e5aade
commit 815391126e
2 changed files with 20 additions and 17 deletions

View File

@ -5427,6 +5427,8 @@ _e_comp_x_del(E_Comp *c)
ecore_x_window_key_ungrab(c->root, "F", ECORE_EVENT_MODIFIER_SHIFT |
ECORE_EVENT_MODIFIER_CTRL |
ECORE_EVENT_MODIFIER_ALT, 0);
if (ecore_x_display_get())
{
if (c->grabbed)
{
c->grabbed = 0;
@ -5444,6 +5446,7 @@ _e_comp_x_del(E_Comp *c)
ecore_x_window_free(c->cm_selection);
ecore_x_screen_is_composited_set(0, 0);
}
eina_list_free(c->x_comp_data->retry_clients);
ecore_timer_del(c->x_comp_data->retry_timer);
@ -5966,9 +5969,9 @@ e_comp_x_shutdown(void)
E_FREE_FUNC(frame_extents, eina_hash_free);
E_FREE_FUNC(mouse_in_fix_check_timer, ecore_timer_del);
e_xsettings_shutdown();
if (x_fatal) return;
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
ecore_x_screensaver_custom_blanking_disable();
if (x_fatal) return;
e_atoms_shutdown();
/* ecore_x_ungrab(); */
ecore_x_focus_reset();

View File

@ -622,7 +622,7 @@ _e_xsettings_stop(void)
if (manager->timer_retry)
ecore_timer_del(manager->timer_retry);
if (!stopping)
if ((!stopping) && (!x_fatal))
_e_xsettings_deactivate(manager);
E_FREE(manager);