From 2866e2f98003e0898f4e2b9420fd9e2638a593a5 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 22 Oct 2016 20:22:18 +0200 Subject: [PATCH] elementary: check if its a wayland window before using ecore_wl2 api otherwise there is a bunch of error messages from a app running on x. --- src/lib/elementary/efl_ui_win.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index d9b1b8b..6d750b3 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -919,7 +919,8 @@ _elm_win_mouse_in(Ecore_Evas *ee) _elm_win_throttle_ok = EINA_TRUE; if (sd->resizing) sd->resizing = EINA_FALSE; #ifdef HAVE_ELEMENTARY_WL2 - ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL); + if (sd->wl.win) + ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL); ecore_evas_object_cursor_set(sd->ee, sd->pointer.obj, ELM_OBJECT_LAYER_CURSOR, @@ -3517,7 +3518,8 @@ _elm_win_frame_cb_move_start(void *data, if (!sd) return; #ifdef HAVE_ELEMENTARY_WL2 - ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL); + if (sd->wl.win) + ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL); if (!strcmp(source, "elm")) _elm_theme_object_set(sd->obj, sd->pointer.obj, @@ -3551,7 +3553,8 @@ _elm_win_frame_cb_move_stop(void *data, if (!sd) return; #ifdef HAVE_ELEMENTARY_WL2 - ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL); + if (sd->wl.win) + ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL); _elm_theme_object_set(sd->obj, sd->pointer.obj, "pointer", "base", "default"); #endif } -- 2.7.4