Compare commits

...

2 Commits

Author SHA1 Message Date
Marcel Hollerbach 9b1cc6a380 xwayland: show the dialog after ecore_wl2 is in sync
otherwise ecore_wl2 could produce crashes.
2016-08-03 19:42:06 +02:00
Marcel Hollerbach 348a051af1 e_dnd: move the ungrab to the object free
otherwise there are cases where the ungrabbing is not executing, and
blocking input.
2016-08-03 19:41:54 +02:00
3 changed files with 11 additions and 5 deletions

View File

@ -376,7 +376,6 @@ _e_comp_wl_data_source_cb_resource_destroy(struct wl_resource *resource)
if (e_comp_wl->drag_source == source) if (e_comp_wl->drag_source == source)
{ {
e_comp_wl->drag_source = NULL;
//free the drag here //free the drag here
e_object_del(E_OBJECT(e_comp_wl->drag)); e_object_del(E_OBJECT(e_comp_wl->drag));
e_comp_wl->drag = NULL; e_comp_wl->drag = NULL;

View File

@ -1072,8 +1072,6 @@ _e_drag_end(int x, int y)
_drag_current->cb.finished = NULL; _drag_current->cb.finished = NULL;
e_object_del(E_OBJECT(_drag_current)); e_object_del(E_OBJECT(_drag_current));
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
e_comp_ungrab_input(1, 1);
} }
static void static void
@ -1153,6 +1151,10 @@ _e_drag_free(E_Drag *drag)
ecore_x_window_free(_drag_win); ecore_x_window_free(_drag_win);
ecore_x_window_shadow_tree_flush(); ecore_x_window_shadow_tree_flush();
} }
else
{
e_comp_ungrab_input(1, 1);
}
#endif #endif
e_bindings_disabled_set(0); e_bindings_disabled_set(0);
_drag_win = 0; _drag_win = 0;

View File

@ -9,6 +9,7 @@
EINTERN void dnd_init(void); EINTERN void dnd_init(void);
EINTERN void dnd_shutdown(void); EINTERN void dnd_shutdown(void);
static Ecore_Event_Handler *sync_handler;
static E_Module *xwl_init(E_Module *m); static E_Module *xwl_init(E_Module *m);
static void xwl_shutdown(void); static void xwl_shutdown(void);
@ -337,9 +338,13 @@ setup_lock(void)
} }
static Eina_Bool static Eina_Bool
error_dialog() _cb_sync_done(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{ {
e_util_dialog_internal(_("Error"), _("Cannot launch XWayland from X11 display.")); e_util_dialog_internal(_("Error"), _("Cannot launch XWayland from X11 display."));
ecore_event_handler_del(sync_handler);
sync_handler = NULL;
return EINA_FALSE; return EINA_FALSE;
} }
@ -353,7 +358,7 @@ xwl_init(E_Module *m)
if (getenv("DISPLAY")) if (getenv("DISPLAY"))
{ {
ecore_timer_add(1.0, error_dialog, NULL); sync_handler = ecore_event_handler_add(ECORE_WL2_EVENT_SYNC_DONE, _cb_sync_done, NULL);
return NULL; return NULL;
} }