summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-12-03 12:30:46 -0500
committerChris Michael <cp.michael@samsung.com>2015-12-03 12:30:46 -0500
commit020e4187a7a8eda7dfd9d488a789ba9970fe6263 (patch)
tree59ff9f7b2806a09362a24697f882be41e18f6d90
parent7df562fed5a2fe4c4eae4880fd65b8b448da6b9b (diff)
parent257e6b564fcf5213432d8728df39120ae44ff813 (diff)
elementary: Port elementary to use Ecore_Wl2 library
This is a merge of branch 'devs/devilhorns/ecore_wl2' that ports Elementary to use the new Ecore_Wl2 library. This port allows for improved time to first frame, reduced input latency, and proper support for xdg window geometry. @feature
-rw-r--r--configure.ac2
-rw-r--r--src/lib/elm_cnp.c182
-rw-r--r--src/lib/elm_config.c24
-rw-r--r--src/lib/elm_priv.h8
-rw-r--r--src/lib/elm_win.c125
-rw-r--r--src/lib/elm_win.eo4
-rw-r--r--src/lib/elm_win_legacy.h2
-rw-r--r--src/lib/els_cursor.c18
8 files changed, 211 insertions, 154 deletions
diff --git a/configure.ac b/configure.ac
index 1c883581c..1271665b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,7 +247,7 @@ ELM_CHECK_BACKEND([PSL1GHT])
247ELM_CHECK_BACKEND([SDL]) 247ELM_CHECK_BACKEND([SDL])
248ELM_CHECK_BACKEND([Cocoa]) 248ELM_CHECK_BACKEND([Cocoa])
249ELM_CHECK_BACKEND([Win32]) 249ELM_CHECK_BACKEND([Win32])
250ELM_CHECK_BACKEND([Wayland]) 250ELM_CHECK_BACKEND([Wl2])
251ELM_CHECK_BACKEND([DRM]) 251ELM_CHECK_BACKEND([DRM])
252 252
253ELM_CHECK_OPTION([elocation], [0.1.0]) 253ELM_CHECK_OPTION([elocation], [0.1.0])
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 070105746..7be51d924 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2309,7 +2309,7 @@ _x11_elm_selection_selection_has_owner(Evas_Object *obj EINA_UNUSED)
2309 2309
2310#endif 2310#endif
2311 2311
2312#ifdef HAVE_ELEMENTARY_WAYLAND 2312#ifdef HAVE_ELEMENTARY_WL2
2313typedef struct _Wl_Cnp_Selection Wl_Cnp_Selection; 2313typedef struct _Wl_Cnp_Selection Wl_Cnp_Selection;
2314 2314
2315struct _Wl_Cnp_Selection 2315struct _Wl_Cnp_Selection
@@ -2329,7 +2329,7 @@ struct _Wl_Cnp_Selection
2329 void *loss_data; 2329 void *loss_data;
2330 2330
2331 Elm_Sel_Format format; 2331 Elm_Sel_Format format;
2332 Ecore_Wl_Window *win; 2332 Ecore_Wl2_Window *win;
2333 Elm_Xdnd_Action action; 2333 Elm_Xdnd_Action action;
2334 2334
2335 Eina_Bool active : 1; 2335 Eina_Bool active : 1;
@@ -2376,7 +2376,7 @@ static Dropable *_wl_dropable_find(unsigned int win);
2376static void _wl_dropable_handle(Dropable *drop, Evas_Coord x, Evas_Coord y); 2376static void _wl_dropable_handle(Dropable *drop, Evas_Coord x, Evas_Coord y);
2377static void _wl_dropable_all_clean(unsigned int win); 2377static void _wl_dropable_all_clean(unsigned int win);
2378static Eina_Bool _wl_drops_accept(const char *type); 2378static Eina_Bool _wl_drops_accept(const char *type);
2379static unsigned int _wl_elm_widget_window_get(const Evas_Object *obj); 2379static Ecore_Wl2_Window *_wl_elm_widget_window_get(const Evas_Object *obj);
2380static Evas * _wl_evas_get_from_win(unsigned int win); 2380static Evas * _wl_evas_get_from_win(unsigned int win);
2381 2381
2382static void 2382static void
@@ -2397,7 +2397,7 @@ _wl_sel_obj_del2(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_
2397static Eina_Bool 2397static Eina_Bool
2398_wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, const void *selbuf, size_t buflen) 2398_wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, const void *selbuf, size_t buflen)
2399{ 2399{
2400 Ecore_Wl_Window *win; 2400 Ecore_Wl2_Window *win;
2401 Wl_Cnp_Selection *sel = &wl_cnp_selection; 2401 Wl_Cnp_Selection *sel = &wl_cnp_selection;
2402 2402
2403 if ((!selbuf) && (format != ELM_SEL_FORMAT_IMAGE)) 2403 if ((!selbuf) && (format != ELM_SEL_FORMAT_IMAGE))
@@ -2408,7 +2408,7 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Form
2408 2408
2409 _wl_elm_cnp_init(); 2409 _wl_elm_cnp_init();
2410 2410
2411 win = elm_win_wl_window_get(obj); 2411 win = _wl_elm_widget_window_get(obj);
2412 2412
2413 if (sel->loss_cb) sel->loss_cb(sel->loss_data, selection); 2413 if (sel->loss_cb) sel->loss_cb(sel->loss_data, selection);
2414 2414
@@ -2465,7 +2465,7 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Form
2465 2465
2466 if (i < 0) return EINA_FALSE; 2466 if (i < 0) return EINA_FALSE;
2467 2467
2468 ecore_wl_dnd_selection_set(ecore_wl_input_get(), types); 2468 ecore_wl2_dnd_selection_set(ecore_wl2_window_input_get(win), types);
2469 2469
2470 free(sel->selbuf); 2470 free(sel->selbuf);
2471 sel->buflen = buflen; 2471 sel->buflen = buflen;
@@ -2483,12 +2483,12 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Form
2483static Eina_Bool 2483static Eina_Bool
2484_wl_elm_cnp_selection_get(const Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata) 2484_wl_elm_cnp_selection_get(const Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata)
2485{ 2485{
2486 Ecore_Wl_Window *win; 2486 Ecore_Wl2_Window *win;
2487 Wl_Cnp_Selection *sel = &wl_cnp_selection; 2487 Wl_Cnp_Selection *sel = &wl_cnp_selection;
2488 2488
2489 _wl_elm_cnp_init(); 2489 _wl_elm_cnp_init();
2490 2490
2491 win = elm_win_wl_window_get(obj); 2491 win = _wl_elm_widget_window_get(obj);
2492 2492
2493 if (sel->requestwidget) 2493 if (sel->requestwidget)
2494 evas_object_event_callback_del_full(sel->requestwidget, 2494 evas_object_event_callback_del_full(sel->requestwidget,
@@ -2528,7 +2528,7 @@ _wl_elm_cnp_selection_get(const Evas_Object *obj, Elm_Sel_Type selection, Elm_Se
2528 2528
2529 if (i < 0) return EINA_FALSE; 2529 if (i < 0) return EINA_FALSE;
2530 2530
2531 ecore_wl_dnd_selection_get(ecore_wl_input_get(), *types); 2531 ecore_wl2_dnd_selection_get(ecore_wl2_window_input_get(win), *types);
2532 } 2532 }
2533 2533
2534 return EINA_TRUE; 2534 return EINA_TRUE;
@@ -2573,7 +2573,7 @@ _wl_elm_cnp_selection_clear(Evas_Object *obj, Elm_Sel_Type selection EINA_UNUSED
2573 ELM_SAFE_FREE(sel->selbuf, free); 2573 ELM_SAFE_FREE(sel->selbuf, free);
2574 sel->buflen = 0; 2574 sel->buflen = 0;
2575 /* sel->clear(); */ 2575 /* sel->clear(); */
2576 ecore_wl_dnd_selection_clear(ecore_wl_input_get()); 2576 ecore_wl2_dnd_selection_clear(ecore_wl2_window_input_get(_wl_elm_widget_window_get(obj)));
2577 2577
2578 return EINA_TRUE; 2578 return EINA_TRUE;
2579} 2579}
@@ -2585,7 +2585,7 @@ _wl_selection_send(void *udata, int type EINA_UNUSED, void *event)
2585 int ret, len_remained; 2585 int ret, len_remained;
2586 int len_written = 0; 2586 int len_written = 0;
2587 Wl_Cnp_Selection *sel = udata; 2587 Wl_Cnp_Selection *sel = udata;
2588 Ecore_Wl_Event_Data_Source_Send *ev = event; 2588 Ecore_Wl2_Event_Data_Source_Send *ev = event;
2589 2589
2590 _wl_elm_cnp_init(); 2590 _wl_elm_cnp_init();
2591 2591
@@ -2609,7 +2609,7 @@ static Eina_Bool
2609_wl_selection_receive(void *udata, int type EINA_UNUSED, void *event) 2609_wl_selection_receive(void *udata, int type EINA_UNUSED, void *event)
2610{ 2610{
2611 Wl_Cnp_Selection *sel = udata; 2611 Wl_Cnp_Selection *sel = udata;
2612 Ecore_Wl_Event_Selection_Data_Ready *ev = event; 2612 Ecore_Wl2_Event_Selection_Data_Ready *ev = event;
2613 2613
2614 _wl_elm_cnp_init(); 2614 _wl_elm_cnp_init();
2615 2615
@@ -2700,9 +2700,9 @@ _wl_elm_cnp_init(void)
2700 if (_init_count > 0) return EINA_TRUE; 2700 if (_init_count > 0) return EINA_TRUE;
2701 _init_count++; 2701 _init_count++;
2702 2702
2703 ecore_event_handler_add(ECORE_WL_EVENT_DATA_SOURCE_SEND, 2703 ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND,
2704 _wl_selection_send, &wl_cnp_selection); 2704 _wl_selection_send, &wl_cnp_selection);
2705 ecore_event_handler_add(ECORE_WL_EVENT_SELECTION_DATA_READY, 2705 ecore_event_handler_add(ECORE_WL2_EVENT_SELECTION_DATA_READY,
2706 _wl_selection_receive, &wl_cnp_selection); 2706 _wl_selection_receive, &wl_cnp_selection);
2707 2707
2708 return EINA_TRUE; 2708 return EINA_TRUE;
@@ -2718,12 +2718,12 @@ _wl_elm_dnd_init(void)
2718 2718
2719 text_uri = eina_stringshare_add("text/uri-list"); 2719 text_uri = eina_stringshare_add("text/uri-list");
2720 2720
2721 ecore_event_handler_add(ECORE_WL_EVENT_DATA_SOURCE_SEND, 2721 ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND,
2722 _wl_dnd_send, &wl_cnp_selection); 2722 _wl_dnd_send, &wl_cnp_selection);
2723 ecore_event_handler_add(ECORE_WL_EVENT_SELECTION_DATA_READY, 2723 ecore_event_handler_add(ECORE_WL2_EVENT_SELECTION_DATA_READY,
2724 _wl_dnd_receive, &wl_cnp_selection); 2724 _wl_dnd_receive, &wl_cnp_selection);
2725 2725
2726 ecore_event_handler_add(ECORE_WL_EVENT_DND_END, 2726 ecore_event_handler_add(ECORE_WL2_EVENT_DND_END,
2727 _wl_dnd_end, &wl_cnp_selection); 2727 _wl_dnd_end, &wl_cnp_selection);
2728 2728
2729 return EINA_TRUE; 2729 return EINA_TRUE;
@@ -2769,16 +2769,16 @@ _wl_elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format, Elm_Drag_State
2769 if (first) 2769 if (first)
2770 { 2770 {
2771 handler_enter = 2771 handler_enter =
2772 ecore_event_handler_add(ECORE_WL_EVENT_DND_ENTER, 2772 ecore_event_handler_add(ECORE_WL2_EVENT_DND_ENTER,
2773 _wl_dnd_enter, NULL); 2773 _wl_dnd_enter, NULL);
2774 handler_leave = 2774 handler_leave =
2775 ecore_event_handler_add(ECORE_WL_EVENT_DND_LEAVE, 2775 ecore_event_handler_add(ECORE_WL2_EVENT_DND_LEAVE,
2776 _wl_dnd_leave, NULL); 2776 _wl_dnd_leave, NULL);
2777 handler_pos = 2777 handler_pos =
2778 ecore_event_handler_add(ECORE_WL_EVENT_DND_POSITION, 2778 ecore_event_handler_add(ECORE_WL2_EVENT_DND_MOTION,
2779 _wl_dnd_position, NULL); 2779 _wl_dnd_position, NULL);
2780 handler_drop = 2780 handler_drop =
2781 ecore_event_handler_add(ECORE_WL_EVENT_DND_DROP, 2781 ecore_event_handler_add(ECORE_WL2_EVENT_DND_DROP,
2782 _wl_dnd_drop, NULL); 2782 _wl_dnd_drop, NULL);
2783 _wl_elm_dnd_init(); 2783 _wl_elm_dnd_init();
2784 } 2784 }
@@ -2838,7 +2838,7 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data,
2838 int x, y, x2 = 0, y2 = 0, x3, y3, w = 0, h = 0; 2838 int x, y, x2 = 0, y2 = 0, x3, y3, w = 0, h = 0;
2839 const char *types[CNP_N_ATOMS + 1]; 2839 const char *types[CNP_N_ATOMS + 1];
2840 int i, nb_types = 0; 2840 int i, nb_types = 0;
2841 Ecore_Wl_Window *parent = NULL; 2841 Ecore_Wl2_Window *parent = NULL, *win;
2842 2842
2843 _wl_elm_dnd_init(); 2843 _wl_elm_dnd_init();
2844 2844
@@ -2854,7 +2854,9 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data,
2854 } 2854 }
2855 } 2855 }
2856 types[nb_types] = NULL; 2856 types[nb_types] = NULL;
2857 ecore_wl_dnd_drag_types_set(ecore_wl_input_get(), types); 2857
2858 win = _wl_elm_widget_window_get(obj);
2859 ecore_wl2_dnd_drag_types_set(ecore_wl2_window_input_get(win), types);
2858 2860
2859 /* set the drag data used when a drop occurs */ 2861 /* set the drag data used when a drop occurs */
2860 free(wl_cnp_selection.selbuf); 2862 free(wl_cnp_selection.selbuf);
@@ -2879,8 +2881,9 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data,
2879 elm_win_borderless_set(dragwin, EINA_TRUE); 2881 elm_win_borderless_set(dragwin, EINA_TRUE);
2880 elm_win_override_set(dragwin, EINA_TRUE); 2882 elm_win_override_set(dragwin, EINA_TRUE);
2881 2883
2882 ecore_wl_window_type_set(elm_win_wl_window_get(dragwin), 2884 win = elm_win_wl_window_get(dragwin);
2883 ECORE_WL_WINDOW_TYPE_DND); 2885
2886 ecore_wl2_window_type_set(win, ECORE_WL2_WINDOW_TYPE_DND);
2884 2887
2885 if (createicon) 2888 if (createicon)
2886 { 2889 {
@@ -2938,12 +2941,10 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data,
2938 if (!(ee = ecore_evas_ecore_evas_get(evas))) 2941 if (!(ee = ecore_evas_ecore_evas_get(evas)))
2939 return EINA_FALSE; 2942 return EINA_FALSE;
2940 2943
2941 parent = ecore_evas_wayland_window_get(ee); 2944 parent = ecore_evas_wayland_window_get2(ee);
2942 } 2945 }
2943 2946
2944 ecore_wl_dnd_drag_start(ecore_wl_input_get(), parent, 2947 ecore_wl2_dnd_drag_start(ecore_wl2_window_input_get(win), parent, win);
2945 elm_win_wl_window_get(dragwin),
2946 x3, y3, w, h);
2947 2948
2948 return EINA_TRUE; 2949 return EINA_TRUE;
2949} 2950}
@@ -2958,7 +2959,7 @@ _wl_drag_source_del(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object
2958static Eina_Bool 2959static Eina_Bool
2959_wl_dnd_enter(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) 2960_wl_dnd_enter(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
2960{ 2961{
2961 Ecore_Wl_Event_Dnd_Enter *ev; 2962 Ecore_Wl2_Event_Dnd_Enter *ev;
2962 int i = 0; 2963 int i = 0;
2963 2964
2964 ev = event; 2965 ev = event;
@@ -2996,7 +2997,7 @@ _wl_dnd_enter(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
2996static Eina_Bool 2997static Eina_Bool
2997_wl_dnd_leave(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) 2998_wl_dnd_leave(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
2998{ 2999{
2999 Ecore_Wl_Event_Dnd_Leave *ev; 3000 Ecore_Wl2_Event_Dnd_Leave *ev;
3000 Dropable *drop; 3001 Dropable *drop;
3001 cnp_debug("In\n"); 3002 cnp_debug("In\n");
3002 3003
@@ -3013,16 +3014,16 @@ _wl_dnd_leave(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
3013static Eina_Bool 3014static Eina_Bool
3014_wl_dnd_position(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) 3015_wl_dnd_position(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
3015{ 3016{
3016 Ecore_Wl_Event_Dnd_Position *ev; 3017 Ecore_Wl2_Event_Dnd_Motion *ev;
3017 Dropable *drop; 3018 Dropable *drop;
3018 Eina_Bool will_accept = EINA_FALSE; 3019 Eina_Bool will_accept = EINA_FALSE;
3019 3020
3020 ev = event; 3021 ev = event;
3021 3022
3022 cnp_debug("mouse pos %i %i\n", ev->position.x, ev->position.y); 3023 cnp_debug("mouse pos %i %i\n", ev->x, ev->y);
3023 3024
3024 dragwin_x_end = ev->position.x - _dragx; 3025 dragwin_x_end = ev->x - _dragx;
3025 dragwin_y_end = ev->position.y - _dragy; 3026 dragwin_y_end = ev->y - _dragy;
3026 3027
3027 drop = _wl_dropable_find(ev->win); 3028 drop = _wl_dropable_find(ev->win);
3028 3029
@@ -3030,8 +3031,8 @@ _wl_dnd_position(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
3030 { 3031 {
3031 Evas_Coord x = 0, y = 0; 3032 Evas_Coord x = 0, y = 0;
3032 3033
3033 x = ev->position.x; 3034 x = ev->x;
3034 y = ev->position.y; 3035 y = ev->y;
3035 _dropable_coords_adjust(drop, &x, &y); 3036 _dropable_coords_adjust(drop, &x, &y);
3036 Evas *evas = _wl_evas_get_from_win(ev->win); 3037 Evas *evas = _wl_evas_get_from_win(ev->win);
3037 3038
@@ -3113,14 +3114,15 @@ _wl_dnd_position(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
3113static Eina_Bool 3114static Eina_Bool
3114_wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) 3115_wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
3115{ 3116{
3116 Ecore_Wl_Event_Dnd_Drop *ev; 3117 Ecore_Wl2_Event_Dnd_Drop *ev;
3118 Ecore_Wl2_Window *win;
3117 Dropable *drop; 3119 Dropable *drop;
3118 Eina_List *l; 3120 Eina_List *l;
3119 3121
3120 cnp_debug("In\n"); 3122 cnp_debug("In\n");
3121 ev = event; 3123 ev = event;
3122 savedtypes.x = ev->position.x; 3124 savedtypes.x = ev->x;
3123 savedtypes.y = ev->position.y; 3125 savedtypes.y = ev->y;
3124 3126
3125 EINA_LIST_FOREACH(drops, l, drop) 3127 EINA_LIST_FOREACH(drops, l, drop)
3126 { 3128 {
@@ -3132,12 +3134,16 @@ _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
3132 EVAS_CALLBACK_DEL, 3134 EVAS_CALLBACK_DEL,
3133 _wl_sel_obj_del2, 3135 _wl_sel_obj_del2,
3134 &wl_cnp_selection); 3136 &wl_cnp_selection);
3135 ecore_wl_dnd_drag_get(ecore_wl_input_get(), drop->last.type); 3137
3138 win = _wl_elm_widget_window_get(drop->obj);
3139 ecore_wl2_dnd_drag_get(ecore_wl2_window_input_get(win),
3140 drop->last.type);
3136 return ECORE_CALLBACK_PASS_ON; 3141 return ECORE_CALLBACK_PASS_ON;
3137 } 3142 }
3138 } 3143 }
3139 3144
3140 ecore_wl_dnd_drag_end(ecore_wl_input_get()); 3145 win = ecore_wl2_display_window_find(_elm_wl_display, ev->win);
3146 ecore_wl2_dnd_drag_end(ecore_wl2_window_input_get(win));
3141 return ECORE_CALLBACK_PASS_ON; 3147 return ECORE_CALLBACK_PASS_ON;
3142} 3148}
3143 3149
@@ -3148,7 +3154,7 @@ _wl_dnd_send(void *data, int type EINA_UNUSED, void *event)
3148 int ret, len_remained; 3154 int ret, len_remained;
3149 int len_written = 0; 3155 int len_written = 0;
3150 Wl_Cnp_Selection *sel; 3156 Wl_Cnp_Selection *sel;
3151 Ecore_Wl_Event_Data_Source_Send *ev; 3157 Ecore_Wl2_Event_Data_Source_Send *ev;
3152 3158
3153 cnp_debug("In\n"); 3159 cnp_debug("In\n");
3154 ev = event; 3160 ev = event;
@@ -3174,7 +3180,7 @@ static Eina_Bool
3174_wl_dnd_receive(void *data, int type EINA_UNUSED, void *event) 3180_wl_dnd_receive(void *data, int type EINA_UNUSED, void *event)
3175{ 3181{
3176 Wl_Cnp_Selection *sel; 3182 Wl_Cnp_Selection *sel;
3177 Ecore_Wl_Event_Selection_Data_Ready *ev; 3183 Ecore_Wl2_Event_Selection_Data_Ready *ev;
3178 cnp_debug("In\n"); 3184 cnp_debug("In\n");
3179 3185
3180 ev = event; 3186 ev = event;
@@ -3197,12 +3203,14 @@ _wl_dnd_receive(void *data, int type EINA_UNUSED, void *event)
3197} 3203}
3198 3204
3199static Eina_Bool 3205static Eina_Bool
3200_wl_dnd_end(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) 3206_wl_dnd_end(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
3201{ 3207{
3208 Ecore_Wl2_Event_Dnd_End *ev;
3209 Ecore_Wl2_Window *win;
3210
3202 cnp_debug("In\n"); 3211 cnp_debug("In\n");
3203 /* Ecore_Wl_Event_Dnd_End *ev; */
3204 3212
3205 /* ev = event; */ 3213 ev = event;
3206 3214
3207 if (dragdonecb) dragdonecb(dragdonedata, dragwidget); 3215 if (dragdonecb) dragdonecb(dragdonedata, dragwidget);
3208 3216
@@ -3229,7 +3237,8 @@ _wl_dnd_end(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSE
3229 dragwidget = NULL; 3237 dragwidget = NULL;
3230 doaccept = EINA_FALSE; 3238 doaccept = EINA_FALSE;
3231 3239
3232 ecore_wl_input_ungrab(ecore_wl_input_get()); 3240 win = ecore_wl2_display_window_find(_elm_wl_display, ev->win);
3241 ecore_wl2_input_ungrab(ecore_wl2_window_input_get(win));
3233 3242
3234 return ECORE_CALLBACK_PASS_ON; 3243 return ECORE_CALLBACK_PASS_ON;
3235} 3244}
@@ -3243,17 +3252,21 @@ _wl_dropable_match(Dropable_Cbs *cbs, Dropable *drop, Elm_Sel_Format fmt)
3243static void 3252static void
3244_wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data, size_t size) 3253_wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data, size_t size)
3245{ 3254{
3246 cnp_debug("In\n");
3247 Dropable *drop; 3255 Dropable *drop;
3248 Elm_Selection_Data sdata; 3256 Elm_Selection_Data sdata;
3257 Ecore_Wl2_Window *win;
3249 char *s; 3258 char *s;
3250 3259
3260 cnp_debug("In\n");
3261
3251 sdata.action = ELM_XDND_ACTION_COPY; 3262 sdata.action = ELM_XDND_ACTION_COPY;
3252 3263
3253 sdata.len = size; 3264 sdata.len = size;
3254 sdata.x = savedtypes.x; 3265 sdata.x = savedtypes.x;
3255 sdata.y = savedtypes.y; 3266 sdata.y = savedtypes.y;
3256 3267
3268 win = _wl_elm_widget_window_get(sel->requestwidget);
3269
3257 eo_do(sel->requestwidget, drop = eo_key_data_get("__elm_dropable")); 3270 eo_do(sel->requestwidget, drop = eo_key_data_get("__elm_dropable"));
3258 if (drop) 3271 if (drop)
3259 { 3272 {
@@ -3267,7 +3280,7 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data, size_t size)
3267 savedtypes.textreq || _wl_dropable_match(cbs, drop, ELM_SEL_FORMAT_TEXT)); 3280 savedtypes.textreq || _wl_dropable_match(cbs, drop, ELM_SEL_FORMAT_TEXT));
3268 if (!s) 3281 if (!s)
3269 { 3282 {
3270 ecore_wl_dnd_drag_end(ecore_wl_input_get()); 3283 ecore_wl2_dnd_drag_end(ecore_wl2_window_input_get(win));
3271 return; 3284 return;
3272 } 3285 }
3273 3286
@@ -3287,7 +3300,8 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data, size_t size)
3287 } 3300 }
3288 } 3301 }
3289 } 3302 }
3290 ecore_wl_dnd_drag_end(ecore_wl_input_get()); 3303
3304 ecore_wl2_dnd_drag_end(ecore_wl2_window_input_get(win));
3291 savedtypes.textreq = 0; 3305 savedtypes.textreq = 0;
3292} 3306}
3293 3307
@@ -3296,11 +3310,17 @@ _wl_dropable_find(unsigned int win)
3296{ 3310{
3297 Eina_List *l; 3311 Eina_List *l;
3298 Dropable *dropable; 3312 Dropable *dropable;
3313 Ecore_Wl2_Window *window;
3299 3314
3300 if (!drops) return NULL; 3315 if (!drops) return NULL;
3316
3317 window = ecore_wl2_display_window_find(_elm_wl_display, win);
3318 if (!window) return NULL;
3319
3301 EINA_LIST_FOREACH(drops, l, dropable) 3320 EINA_LIST_FOREACH(drops, l, dropable)
3302 if (_wl_elm_widget_window_get(dropable->obj) == win) 3321 if (_wl_elm_widget_window_get(dropable->obj) == window)
3303 return dropable; 3322 return dropable;
3323
3304 return NULL; 3324 return NULL;
3305} 3325}
3306 3326
@@ -3362,10 +3382,14 @@ _wl_dropable_all_clean(unsigned int win)
3362{ 3382{
3363 Eina_List *l; 3383 Eina_List *l;
3364 Dropable *dropable; 3384 Dropable *dropable;
3385 Ecore_Wl2_Window *window;
3386
3387 window = ecore_wl2_display_window_find(_elm_wl_display, win);
3388 if (!window) return;
3365 3389
3366 EINA_LIST_FOREACH(drops, l, dropable) 3390 EINA_LIST_FOREACH(drops, l, dropable)
3367 { 3391 {
3368 if (_wl_elm_widget_window_get(dropable->obj) == win) 3392 if (_wl_elm_widget_window_get(dropable->obj) == window)
3369 { 3393 {
3370 dropable->last.x = 0; 3394 dropable->last.x = 0;
3371 dropable->last.y = 0; 3395 dropable->last.y = 0;
@@ -3413,11 +3437,11 @@ _wl_drops_accept(const char *type)
3413 return will_accept; 3437 return will_accept;
3414} 3438}
3415 3439
3416static unsigned int 3440static Ecore_Wl2_Window *
3417_wl_elm_widget_window_get(const Evas_Object *obj) 3441_wl_elm_widget_window_get(const Evas_Object *obj)
3418{ 3442{
3419 Evas_Object *top; 3443 Evas_Object *top;
3420 Ecore_Wl_Window *win = NULL; 3444 Ecore_Wl2_Window *win = NULL;
3421 3445
3422 if (elm_widget_is(obj)) 3446 if (elm_widget_is(obj))
3423 { 3447 {
@@ -3433,26 +3457,26 @@ _wl_elm_widget_window_get(const Evas_Object *obj)
3433 const char *engine_name; 3457 const char *engine_name;
3434 3458
3435 if (!(evas = evas_object_evas_get(obj))) 3459 if (!(evas = evas_object_evas_get(obj)))
3436 return 0; 3460 return NULL;
3437 if (!(ee = ecore_evas_ecore_evas_get(evas))) 3461 if (!(ee = ecore_evas_ecore_evas_get(evas)))
3438 return 0; 3462 return NULL;
3439 3463
3440 engine_name = ecore_evas_engine_name_get(ee); 3464 engine_name = ecore_evas_engine_name_get(ee);
3441 if (!strcmp(engine_name, ELM_BUFFER)) 3465 if (!strcmp(engine_name, ELM_BUFFER))
3442 { 3466 {
3443 ee = ecore_evas_buffer_ecore_evas_parent_get(ee); 3467 ee = ecore_evas_buffer_ecore_evas_parent_get(ee);
3444 if (!ee) return 0; 3468 if (!ee) return NULL;
3445 win = ecore_evas_wayland_window_get(ee); 3469 win = ecore_evas_wayland_window_get2(ee);
3446 } 3470 }
3447 else if (!strncmp(engine_name, "wayland", sizeof("wayland") - 1)) 3471 else if (!strncmp(engine_name, "wayland", sizeof("wayland") - 1))
3448 { 3472 {
3449 /* In case the engine is not a buffer, we want to check once. */ 3473 /* In case the engine is not a buffer, we want to check once. */
3450 win = ecore_evas_wayland_window_get(ee); 3474 win = ecore_evas_wayland_window_get2(ee);
3451 if (!win) return 0; 3475 if (!win) return NULL;
3452 } 3476 }
3453 } 3477 }
3454 3478
3455 return ecore_wl_window_id_get(win); 3479 return win;
3456} 3480}
3457 3481
3458#endif 3482#endif
@@ -3832,7 +3856,7 @@ elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection,
3832 if (xwin) 3856 if (xwin)
3833 return _x11_elm_cnp_selection_set(xwin, obj, selection, format, selbuf, buflen); 3857 return _x11_elm_cnp_selection_set(xwin, obj, selection, format, selbuf, buflen);
3834#endif 3858#endif
3835#ifdef HAVE_ELEMENTARY_WAYLAND 3859#ifdef HAVE_ELEMENTARY_WL2
3836 if (_wl_elm_widget_window_get(obj)) 3860 if (_wl_elm_widget_window_get(obj))
3837 return _wl_elm_cnp_selection_set(obj, selection, format, selbuf, buflen); 3861 return _wl_elm_cnp_selection_set(obj, selection, format, selbuf, buflen);
3838#endif 3862#endif
@@ -3850,7 +3874,7 @@ elm_cnp_selection_loss_callback_set(Evas_Object *obj, Elm_Sel_Type selection,
3850 if (_x11_elm_widget_xwin_get(obj)) 3874 if (_x11_elm_widget_xwin_get(obj))
3851 _x11_elm_cnp_selection_loss_callback_set(obj, selection, func, data); 3875 _x11_elm_cnp_selection_loss_callback_set(obj, selection, func, data);
3852#endif 3876#endif
3853#ifdef HAVE_ELEMENTARY_WAYLAND 3877#ifdef HAVE_ELEMENTARY_WL2
3854 if (_wl_elm_widget_window_get(obj)) 3878 if (_wl_elm_widget_window_get(obj))
3855 _wl_elm_cnp_selection_loss_callback_set(obj, selection, func, data); 3879 _wl_elm_cnp_selection_loss_callback_set(obj, selection, func, data);
3856#endif 3880#endif
@@ -3866,7 +3890,7 @@ elm_object_cnp_selection_clear(Evas_Object *obj, Elm_Sel_Type selection)
3866 if (_x11_elm_widget_xwin_get(obj)) 3890 if (_x11_elm_widget_xwin_get(obj))
3867 return _x11_elm_object_cnp_selection_clear(obj, selection); 3891 return _x11_elm_object_cnp_selection_clear(obj, selection);
3868#endif 3892#endif
3869#ifdef HAVE_ELEMENTARY_WAYLAND 3893#ifdef HAVE_ELEMENTARY_WL2
3870 if (_wl_elm_widget_window_get(obj)) 3894 if (_wl_elm_widget_window_get(obj))
3871 return _wl_elm_cnp_selection_clear(obj, selection); 3895 return _wl_elm_cnp_selection_clear(obj, selection);
3872#endif 3896#endif
@@ -3884,7 +3908,7 @@ elm_cnp_selection_get(const Evas_Object *obj, Elm_Sel_Type selection,
3884 if (xwin) 3908 if (xwin)
3885 return _x11_elm_cnp_selection_get(xwin, obj, selection, format, datacb, udata); 3909 return _x11_elm_cnp_selection_get(xwin, obj, selection, format, datacb, udata);
3886#endif 3910#endif
3887#ifdef HAVE_ELEMENTARY_WAYLAND 3911#ifdef HAVE_ELEMENTARY_WL2
3888 if (_wl_elm_widget_window_get(obj)) 3912 if (_wl_elm_widget_window_get(obj))
3889 return _wl_elm_cnp_selection_get(obj, selection, format, datacb, udata); 3913 return _wl_elm_cnp_selection_get(obj, selection, format, datacb, udata);
3890#endif 3914#endif
@@ -3910,7 +3934,7 @@ elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format,
3910 leavecb, leavedata, poscb, posdata, 3934 leavecb, leavedata, poscb, posdata,
3911 dropcb, dropdata); 3935 dropcb, dropdata);
3912#endif 3936#endif
3913#ifdef HAVE_ELEMENTARY_WAYLAND 3937#ifdef HAVE_ELEMENTARY_WL2
3914 if (_wl_elm_widget_window_get(obj)) 3938 if (_wl_elm_widget_window_get(obj))
3915 return _wl_elm_drop_target_add(obj, format, entercb, enterdata, 3939 return _wl_elm_drop_target_add(obj, format, entercb, enterdata,
3916 leavecb, leavedata, poscb, posdata, 3940 leavecb, leavedata, poscb, posdata,
@@ -3934,7 +3958,7 @@ elm_drop_target_del(Evas_Object *obj, Elm_Sel_Format format,
3934 return _x11_elm_drop_target_del(obj, format, entercb, enterdata, 3958 return _x11_elm_drop_target_del(obj, format, entercb, enterdata,
3935 leavecb, leavedata, poscb, posdata, dropcb, dropdata); 3959 leavecb, leavedata, poscb, posdata, dropcb, dropdata);
3936#endif 3960#endif
3937#ifdef HAVE_ELEMENTARY_WAYLAND 3961#ifdef HAVE_ELEMENTARY_WL2
3938 if (_wl_elm_widget_window_get(obj)) 3962 if (_wl_elm_widget_window_get(obj))
3939 return _wl_elm_drop_target_del(obj, format, entercb, enterdata, 3963 return _wl_elm_drop_target_del(obj, format, entercb, enterdata,
3940 leavecb, leavedata, poscb, posdata, dropcb, dropdata); 3964 leavecb, leavedata, poscb, posdata, dropcb, dropdata);
@@ -3967,7 +3991,7 @@ elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data,
3967 acceptcb, acceptdata, 3991 acceptcb, acceptdata,
3968 dragdone, donecbdata); 3992 dragdone, donecbdata);
3969#endif 3993#endif
3970#ifdef HAVE_ELEMENTARY_WAYLAND 3994#ifdef HAVE_ELEMENTARY_WL2
3971 if (_wl_elm_widget_window_get(obj)) 3995 if (_wl_elm_widget_window_get(obj))
3972 return _wl_elm_drag_start(obj, format, data, action, 3996 return _wl_elm_drag_start(obj, format, data, action,
3973 createicon, createdata, 3997 createicon, createdata,
@@ -3990,7 +4014,7 @@ elm_drag_action_set(Evas_Object *obj, Elm_Xdnd_Action action)
3990 if (_x11_elm_widget_xwin_get(obj)) 4014 if (_x11_elm_widget_xwin_get(obj))
3991 return _x11_elm_drag_action_set(obj, action); 4015 return _x11_elm_drag_action_set(obj, action);
3992#endif 4016#endif
3993#ifdef HAVE_ELEMENTARY_WAYLAND 4017#ifdef HAVE_ELEMENTARY_WL2
3994 if (_wl_elm_widget_window_get(obj)) 4018 if (_wl_elm_widget_window_get(obj))
3995 return _wl_elm_drag_action_set(obj, action); 4019 return _wl_elm_drag_action_set(obj, action);
3996#endif 4020#endif
@@ -4005,9 +4029,12 @@ elm_selection_selection_has_owner(Evas_Object *obj)
4005 if (_x11_elm_widget_xwin_get(obj)) 4029 if (_x11_elm_widget_xwin_get(obj))
4006 return _x11_elm_selection_selection_has_owner(obj); 4030 return _x11_elm_selection_selection_has_owner(obj);
4007#endif 4031#endif
4008#ifdef HAVE_ELEMENTARY_WAYLAND 4032#ifdef HAVE_ELEMENTARY_WL2
4009 if (_wl_elm_widget_window_get(obj)) 4033 Ecore_Wl2_Window *win;
4010 return ecore_wl_dnd_selection_owner_has(ecore_wl_input_get()); 4034
4035 win = _wl_elm_widget_window_get(obj);
4036 if (win)
4037 return ecore_wl2_dnd_selection_owner_has(ecore_wl2_window_input_get(win));
4011#endif 4038#endif
4012 return _local_elm_selection_selection_has_owner(obj); 4039 return _local_elm_selection_selection_has_owner(obj);
4013} 4040}
@@ -4491,9 +4518,12 @@ elm_drag_cancel(Evas_Object *obj)
4491 goto end; 4518 goto end;
4492 } 4519 }
4493#endif 4520#endif
4494#ifdef HAVE_ELEMENTARY_WAYLAND 4521#ifdef HAVE_ELEMENTARY_WL2
4495 if (_wl_elm_widget_window_get(obj)) 4522 Ecore_Wl2_Window *win;
4496 ecore_wl_dnd_drag_end(ecore_wl_input_get()); 4523
4524 win = _wl_elm_widget_window_get(obj);
4525 if (win)
4526 ecore_wl2_dnd_drag_end(ecore_wl2_window_input_get(win));
4497#endif 4527#endif
4498 4528
4499end: 4529end:
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 29ef12de6..f64e4262c 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -31,6 +31,10 @@ Eio_Monitor *_eio_monitor = NULL;
31 31
32Eina_Hash *_elm_key_bindings = NULL; 32Eina_Hash *_elm_key_bindings = NULL;
33 33
34#ifdef HAVE_ELEMENTARY_WL2
35Ecore_Wl2_Display *_elm_wl_display = NULL;
36#endif
37
34const char *_elm_engines[] = { 38const char *_elm_engines[] = {
35 "software_x11", 39 "software_x11",
36 "fb", 40 "fb",
@@ -3316,6 +3320,10 @@ _elm_config_sub_shutdown(void)
3316#ifdef HAVE_ELEMENTARY_X 3320#ifdef HAVE_ELEMENTARY_X
3317 if (ecore_x_display_get()) ecore_x_shutdown(); 3321 if (ecore_x_display_get()) ecore_x_shutdown();
3318#endif 3322#endif
3323#ifdef HAVE_ELEMENTARY_WL2
3324 if (_elm_wl_display) ecore_wl2_display_disconnect(_elm_wl_display);
3325 ecore_wl2_shutdown();
3326#endif
3319 ELM_SAFE_FREE(_eio_monitor, eio_monitor_del); 3327 ELM_SAFE_FREE(_eio_monitor, eio_monitor_del);
3320 ELM_SAFE_FREE(_config_change_delay_timer, ecore_timer_del); 3328 ELM_SAFE_FREE(_config_change_delay_timer, ecore_timer_del);
3321} 3329}
@@ -3350,7 +3358,7 @@ _elm_config_file_monitor_cb(void *data EINA_UNUSED,
3350void 3358void
3351_elm_config_sub_init(void) 3359_elm_config_sub_init(void)
3352{ 3360{
3353#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_WAYLAND) 3361#if defined(HAVE_ELEMENTARY_X) || defined(HAVE_ELEMENTARY_WL2)
3354 const char *ev = getenv("ELM_DISPLAY"); 3362 const char *ev = getenv("ELM_DISPLAY");
3355#endif 3363#endif
3356 3364
@@ -3385,7 +3393,7 @@ _elm_config_sub_init(void)
3385 ecore_x_init(NULL); 3393 ecore_x_init(NULL);
3386 } 3394 }
3387#endif 3395#endif
3388#ifdef HAVE_ELEMENTARY_WAYLAND 3396#ifdef HAVE_ELEMENTARY_WL2
3389 Eina_Bool init_wl = EINA_FALSE; 3397 Eina_Bool init_wl = EINA_FALSE;
3390 Eina_Bool have_wl_display = !!getenv("WAYLAND_DISPLAY"); 3398 Eina_Bool have_wl_display = !!getenv("WAYLAND_DISPLAY");
3391 3399
@@ -3413,7 +3421,17 @@ _elm_config_sub_init(void)
3413 } 3421 }
3414 if (init_wl) 3422 if (init_wl)
3415 { 3423 {
3416 ecore_wl_init(NULL); 3424 if (!ecore_wl2_init())
3425 {
3426 ERR("Could not initialize Ecore_Wl2");
3427 goto end;
3428 }
3429 _elm_wl_display = ecore_wl2_display_connect(NULL);
3430 if (!_elm_wl_display)
3431 {
3432 ERR("Could not connect to Wayland Display");
3433 goto end;
3434 }
3417 } 3435 }
3418#endif 3436#endif
3419 char buf[PATH_MAX]; 3437 char buf[PATH_MAX];
diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h
index be92f1513..e783e44ce 100644
--- a/src/lib/elm_priv.h
+++ b/src/lib/elm_priv.h
@@ -6,8 +6,8 @@
6#ifdef HAVE_ELEMENTARY_FB 6#ifdef HAVE_ELEMENTARY_FB
7#include <Ecore_Fb.h> 7#include <Ecore_Fb.h>
8#endif 8#endif
9#ifdef HAVE_ELEMENTARY_WAYLAND 9#ifdef HAVE_ELEMENTARY_WL2
10#include <Ecore_Wayland.h> 10#include <Ecore_Wl2.h>
11#endif 11#endif
12#ifdef HAVE_ELEMENTARY_DRM 12#ifdef HAVE_ELEMENTARY_DRM
13#include <Ecore_Drm.h> 13#include <Ecore_Drm.h>
@@ -559,6 +559,10 @@ extern const char SIG_WIDGET_ACCESS_CHANGED[];
559extern const char SIG_LAYOUT_FOCUSED[]; 559extern const char SIG_LAYOUT_FOCUSED[];
560extern const char SIG_LAYOUT_UNFOCUSED[]; 560extern const char SIG_LAYOUT_UNFOCUSED[];
561 561
562#ifdef HAVE_ELEMENTARY_WL2
563extern Ecore_Wl2_Display *_elm_wl_display;
564#endif
565
562#ifdef ENABLE_NLS 566#ifdef ENABLE_NLS
563/* Our gettext wrapper, used to disable translation of elm if the app 567/* Our gettext wrapper, used to disable translation of elm if the app
564 * is not translated. */ 568 * is not translated. */
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index b9f78dad6..6de610ca9 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -111,10 +111,10 @@ struct _Elm_Win_Data
111 Ecore_Event_Handler *property_handler; 111 Ecore_Event_Handler *property_handler;
112 } x; 112 } x;
113#endif 113#endif
114#ifdef HAVE_ELEMENTARY_WAYLAND 114#ifdef HAVE_ELEMENTARY_WL2
115 struct 115 struct
116 { 116 {
117 Ecore_Wl_Window *win; 117 Ecore_Wl2_Window *win;
118 Eina_Bool opaque_dirty : 1; 118 Eina_Bool opaque_dirty : 1;
119 } wl; 119 } wl;
120#endif 120#endif
@@ -349,7 +349,7 @@ _win_noblank_eval(void)
349 if (noblanks > 0) ecore_x_screensaver_suspend(); 349 if (noblanks > 0) ecore_x_screensaver_suspend();
350 else ecore_x_screensaver_resume(); 350 else ecore_x_screensaver_resume();
351#endif 351#endif
352#ifdef HAVE_ELEMENTARY_WAYLAND 352#ifdef HAVE_ELEMENTARY_WL2
353 // XXX: no wl implementation of this yet - maybe higher up at prop level 353 // XXX: no wl implementation of this yet - maybe higher up at prop level
354#endif 354#endif
355} 355}
@@ -1246,7 +1246,7 @@ _elm_win_profile_update(Elm_Win_Data *sd)
1246 eo_do(sd->obj, eo_event_callback_call(ELM_WIN_EVENT_PROFILE_CHANGED, NULL)); 1246 eo_do(sd->obj, eo_event_callback_call(ELM_WIN_EVENT_PROFILE_CHANGED, NULL));
1247} 1247}
1248 1248
1249#ifdef HAVE_ELEMENTARY_WAYLAND 1249#ifdef HAVE_ELEMENTARY_WL2
1250static void 1250static void
1251_elm_win_opaque_update(Elm_Win_Data *sd) 1251_elm_win_opaque_update(Elm_Win_Data *sd)
1252{ 1252{
@@ -1255,15 +1255,17 @@ _elm_win_opaque_update(Elm_Win_Data *sd)
1255 if (sd->fullscreen) 1255 if (sd->fullscreen)
1256 { 1256 {
1257 ecore_evas_geometry_get(sd->ee, NULL, NULL, &ow, &oh); 1257 ecore_evas_geometry_get(sd->ee, NULL, NULL, &ow, &oh);
1258 ecore_wl_window_opaque_region_set(sd->wl.win, 0, 0, ow, oh); 1258 ecore_wl2_window_opaque_region_set(sd->wl.win, 0, 0, ow, oh);
1259 ecore_wl_window_update_location(sd->wl.win, 0, 0); 1259 /* TODO */
1260 /* ecore_wl_window_update_location(sd->wl.win, 0, 0); */
1260 return; 1261 return;
1261 } 1262 }
1262 1263
1263 edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque", 1264 edje_object_part_geometry_get(sd->frame_obj, "elm.spacer.opaque",
1264 &ox, &oy, &ow, &oh); 1265 &ox, &oy, &ow, &oh);
1265 ecore_wl_window_opaque_region_set(sd->wl.win, ox, oy, ow, oh); 1266 ecore_wl2_window_opaque_region_set(sd->wl.win, ox, oy, ow, oh);
1266 ecore_wl_window_update_location(sd->wl.win, ox, oy); 1267 /* TODO */
1268 /* ecore_wl_window_update_location(sd->wl.win, ox, oy); */
1267} 1269}
1268#endif 1270#endif
1269 1271
@@ -1273,7 +1275,7 @@ _elm_win_frame_obj_update(Elm_Win_Data *sd)
1273 int fx, fy, fw, fh; 1275 int fx, fy, fw, fh;
1274 int ox, oy, ow, oh; 1276 int ox, oy, ow, oh;
1275 1277
1276#ifdef HAVE_ELEMENTARY_WAYLAND 1278#ifdef HAVE_ELEMENTARY_WL2
1277 sd->wl.opaque_dirty = 1; 1279 sd->wl.opaque_dirty = 1;
1278#endif 1280#endif
1279 if (sd->fullscreen) 1281 if (sd->fullscreen)
@@ -2052,8 +2054,9 @@ _elm_win_evas_object_smart_move(Eo *obj, Elm_Win_Data *sd, Evas_Coord x, Evas_Co
2052 } 2054 }
2053 if (sd->frame_obj) 2055 if (sd->frame_obj)
2054 { 2056 {
2055#ifdef HAVE_ELEMENTARY_WAYLAND 2057#ifdef HAVE_ELEMENTARY_WL2
2056 ecore_wl_window_update_location(sd->wl.win, x, y); 2058 /* TODO */
2059 /* ecore_wl_window_update_location(sd->wl.win, x, y); */
2057#endif 2060#endif
2058 sd->screen.x = x; 2061 sd->screen.x = x;
2059 sd->screen.y = y; 2062 sd->screen.y = y;
@@ -2145,10 +2148,10 @@ _internal_elm_win_xwindow_get(Elm_Win_Data *sd)
2145} 2148}
2146#endif 2149#endif
2147 2150
2148Ecore_Wl_Window * 2151Ecore_Wl2_Window *
2149_elm_ee_wlwin_get(const Ecore_Evas *ee) 2152_elm_ee_wlwin_get(const Ecore_Evas *ee)
2150{ 2153{
2151#ifdef HAVE_ELEMENTARY_WAYLAND 2154#ifdef HAVE_ELEMENTARY_WL2
2152 const char *engine_name; 2155 const char *engine_name;
2153 2156
2154 if (!ee) return NULL; 2157 if (!ee) return NULL;
@@ -2159,7 +2162,7 @@ _elm_ee_wlwin_get(const Ecore_Evas *ee)
2159 if ((!strcmp(engine_name, ELM_WAYLAND_SHM)) || 2162 if ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
2160 (!strcmp(engine_name, ELM_WAYLAND_EGL))) 2163 (!strcmp(engine_name, ELM_WAYLAND_EGL)))
2161 { 2164 {
2162 return ecore_evas_wayland_window_get(ee); 2165 return ecore_evas_wayland_window_get2(ee);
2163 } 2166 }
2164#else 2167#else
2165 (void)ee; 2168 (void)ee;
@@ -2167,7 +2170,7 @@ _elm_ee_wlwin_get(const Ecore_Evas *ee)
2167 return NULL; 2170 return NULL;
2168} 2171}
2169 2172
2170#ifdef HAVE_ELEMENTARY_WAYLAND 2173#ifdef HAVE_ELEMENTARY_WL2
2171static void 2174static void
2172_elm_win_wlwindow_get(Elm_Win_Data *sd) 2175_elm_win_wlwindow_get(Elm_Win_Data *sd)
2173{ 2176{
@@ -2657,11 +2660,11 @@ _elm_win_frame_cb_move_start(void *data,
2657 2660
2658 if (!sd) return; 2661 if (!sd) return;
2659 2662
2660#ifdef HAVE_ELEMENTARY_WAYLAND 2663#ifdef HAVE_ELEMENTARY_WL2
2661 if (!strcmp(source, "elm")) 2664 if (!strcmp(source, "elm"))
2662 ecore_wl_window_cursor_from_name_set(sd->wl.win, ELM_CURSOR_HAND1); 2665 ecore_wl2_window_cursor_from_name_set(sd->wl.win, ELM_CURSOR_HAND1);
2663 else 2666 else
2664 ecore_wl_window_cursor_default_restore(sd->wl.win); 2667 ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL);
2665#else 2668#else
2666 (void)source; 2669 (void)source;
2667#endif 2670#endif
@@ -2687,12 +2690,12 @@ _elm_win_frame_cb_move_stop(void *data,
2687 2690
2688 if (!sd) return; 2691 if (!sd) return;
2689 2692
2690#ifdef HAVE_ELEMENTARY_WAYLAND 2693#ifdef HAVE_ELEMENTARY_WL2
2691 ecore_wl_window_cursor_default_restore(sd->wl.win); 2694 ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL);
2692#endif 2695#endif
2693} 2696}
2694 2697
2695#ifdef HAVE_ELEMENTARY_WAYLAND 2698#ifdef HAVE_ELEMENTARY_WL2
2696struct _resize_info 2699struct _resize_info
2697{ 2700{
2698 const char *name; 2701 const char *name;
@@ -2755,35 +2758,35 @@ _elm_win_frame_cb_resize_show(void *data,
2755 if (!sd) return; 2758 if (!sd) return;
2756 if (sd->resizing) return; 2759 if (sd->resizing) return;
2757 2760
2758#ifdef HAVE_ELEMENTARY_WAYLAND 2761#ifdef HAVE_ELEMENTARY_WL2
2759 int i; 2762 int i;
2760 i = sd->rot / 90; 2763 i = sd->rot / 90;
2761 if (!strcmp(source, "elm.event.resize.t")) 2764 if (!strcmp(source, "elm.event.resize.t"))
2762 ecore_wl_window_cursor_from_name_set(sd->wl.win, 2765 ecore_wl2_window_cursor_from_name_set(sd->wl.win,
2763 _border_side[(0 + i) % 4].name); 2766 _border_side[(0 + i) % 4].name);
2764 else if (!strcmp(source, "elm.event.resize.b")) 2767 else if (!strcmp(source, "elm.event.resize.b"))
2765 ecore_wl_window_cursor_from_name_set(sd->wl.win, 2768 ecore_wl2_window_cursor_from_name_set(sd->wl.win,
2766 _border_side[(2 + i) % 4].name); 2769 _border_side[(2 + i) % 4].name);
2767 else if (!strcmp(source, "elm.event.resize.l")) 2770 else if (!strcmp(source, "elm.event.resize.l"))
2768 ecore_wl_window_cursor_from_name_set(sd->wl.win, 2771 ecore_wl2_window_cursor_from_name_set(sd->wl.win,
2769 _border_side[(1 + i) % 4].name); 2772 _border_side[(1 + i) % 4].name);
2770 else if (!strcmp(source, "elm.event.resize.r")) 2773 else if (!strcmp(source, "elm.event.resize.r"))
2771 ecore_wl_window_cursor_from_name_set(sd->wl.win, 2774 ecore_wl2_window_cursor_from_name_set(sd->wl.win,
2772 _border_side[(3 + i) % 4].name); 2775 _border_side[(3 + i) % 4].name);
2773 else if (!strcmp(source, "elm.event.resize.tl")) 2776 else if (!strcmp(source, "elm.event.resize.tl"))
2774 ecore_wl_window_cursor_from_name_set(sd->wl.win, 2777 ecore_wl2_window_cursor_from_name_set(sd->wl.win,
2775 _border_corner[(0 + i) % 4].name); 2778 _border_corner[(0 + i) % 4].name);
2776 else if (!strcmp(source, "elm.event.resize.tr")) 2779 else if (!strcmp(source, "elm.event.resize.tr"))
2777 ecore_wl_window_cursor_from_name_set(sd->wl.win, 2780 ecore_wl2_window_cursor_from_name_set(sd->wl.win,
2778 _border_corner[(3 + i) % 4].name); 2781 _border_corner[(3 + i) % 4].name);
2779 else if (!strcmp(source, "elm.event.resize.bl")) 2782 else if (!strcmp(source, "elm.event.resize.bl"))
2780 ecore_wl_window_cursor_from_name_set(sd->wl.win, 2783 ecore_wl2_window_cursor_from_name_set(sd->wl.win,
2781 _border_corner[(1 + i) % 4].name); 2784 _border_corner[(1 + i) % 4].name);
2782 else if (!strcmp(source, "elm.event.resize.br")) 2785 else if (!strcmp(source, "elm.event.resize.br"))
2783 ecore_wl_window_cursor_from_name_set(sd->wl.win, 2786 ecore_wl2_window_cursor_from_name_set(sd->wl.win,
2784 _border_corner[(2 + i) % 4].name); 2787 _border_corner[(2 + i) % 4].name);
2785 else 2788 else
2786 ecore_wl_window_cursor_default_restore(sd->wl.win); 2789 ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL);
2787#else 2790#else
2788 (void)source; 2791 (void)source;
2789#endif 2792#endif
@@ -2800,8 +2803,8 @@ _elm_win_frame_cb_resize_hide(void *data,
2800 if (!sd) return; 2803 if (!sd) return;
2801 if (sd->resizing) return; 2804 if (sd->resizing) return;
2802 2805
2803#ifdef HAVE_ELEMENTARY_WAYLAND 2806#ifdef HAVE_ELEMENTARY_WL2
2804 ecore_wl_window_cursor_default_restore(sd->wl.win); 2807 ecore_wl2_window_cursor_from_name_set(sd->wl.win, NULL);
2805#endif 2808#endif
2806} 2809}
2807 2810
@@ -2811,7 +2814,7 @@ _elm_win_frame_cb_resize_start(void *data,
2811 const char *sig EINA_UNUSED, 2814 const char *sig EINA_UNUSED,
2812 const char *source) 2815 const char *source)
2813{ 2816{
2814#ifdef HAVE_ELEMENTARY_WAYLAND 2817#ifdef HAVE_ELEMENTARY_WL2
2815 ELM_WIN_DATA_GET(data, sd); 2818 ELM_WIN_DATA_GET(data, sd);
2816 int i; 2819 int i;
2817 2820
@@ -2914,7 +2917,7 @@ _elm_win_frame_cb_close(void *data,
2914 evas_object_unref(win); 2917 evas_object_unref(win);
2915} 2918}
2916 2919
2917#ifdef HAVE_ELEMENTARY_WAYLAND 2920#ifdef HAVE_ELEMENTARY_WL2
2918static void 2921static void
2919_elm_win_frame_pre_render(void *data, Evas *e EINA_UNUSED, void *ev EINA_UNUSED) 2922_elm_win_frame_pre_render(void *data, Evas *e EINA_UNUSED, void *ev EINA_UNUSED)
2920{ 2923{
@@ -2974,7 +2977,7 @@ _elm_win_frame_add(Elm_Win_Data *sd,
2974 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd); 2977 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
2975 evas_object_event_callback_add 2978 evas_object_event_callback_add
2976 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd); 2979 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
2977#ifdef HAVE_ELEMENTARY_WAYLAND 2980#ifdef HAVE_ELEMENTARY_WL2
2978 evas_event_callback_add(sd->evas, EVAS_CALLBACK_RENDER_PRE, _elm_win_frame_pre_render, sd); 2981 evas_event_callback_add(sd->evas, EVAS_CALLBACK_RENDER_PRE, _elm_win_frame_pre_render, sd);
2979#endif 2982#endif
2980 2983
@@ -3032,7 +3035,7 @@ _elm_win_frame_del(Elm_Win_Data *sd)
3032 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd); 3035 (sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
3033 evas_object_event_callback_del_full 3036 evas_object_event_callback_del_full
3034 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd); 3037 (sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
3035#ifdef HAVE_ELEMENTARY_WAYLAND 3038#ifdef HAVE_ELEMENTARY_WL2
3036 evas_event_callback_del_full(sd->evas, EVAS_CALLBACK_RENDER_PRE, _elm_win_frame_pre_render, sd); 3039 evas_event_callback_del_full(sd->evas, EVAS_CALLBACK_RENDER_PRE, _elm_win_frame_pre_render, sd);
3037#endif 3040#endif
3038 3041
@@ -3392,7 +3395,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
3392 } 3395 }
3393#endif 3396#endif
3394 3397
3395#ifdef HAVE_ELEMENTARY_WAYLAND 3398#ifdef HAVE_ELEMENTARY_WL2
3396 else if ((disp) && (!strcmp(disp, "wl"))) 3399 else if ((disp) && (!strcmp(disp, "wl")))
3397 { 3400 {
3398 if (_accel_is_gl()) 3401 if (_accel_is_gl())
@@ -3473,7 +3476,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
3473 } 3476 }
3474 } 3477 }
3475#endif 3478#endif
3476#ifdef HAVE_ELEMENTARY_WAYLAND 3479#ifdef HAVE_ELEMENTARY_WL2
3477 else if (!_elm_preferred_engine && 3480 else if (!_elm_preferred_engine &&
3478 getenv("WAYLAND_DISPLAY") && !getenv("ELM_ENGINE")) 3481 getenv("WAYLAND_DISPLAY") && !getenv("ELM_ENGINE"))
3479 { 3482 {
@@ -3500,7 +3503,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
3500#ifdef HAVE_ELEMENTARY_X 3503#ifdef HAVE_ELEMENTARY_X
3501 enginelist[p++] = ELM_OPENGL_X11; 3504 enginelist[p++] = ELM_OPENGL_X11;
3502#endif 3505#endif
3503#ifdef HAVE_ELEMENTARY_WAYLAND 3506#ifdef HAVE_ELEMENTARY_WL2
3504 enginelist[p++] = ELM_WAYLAND_EGL; 3507 enginelist[p++] = ELM_WAYLAND_EGL;
3505#endif 3508#endif
3506#ifdef HAVE_ELEMENTARY_DRM 3509#ifdef HAVE_ELEMENTARY_DRM
@@ -3518,7 +3521,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
3518#ifdef HAVE_ELEMENTARY_X 3521#ifdef HAVE_ELEMENTARY_X
3519 enginelist[p++] = ELM_SOFTWARE_X11; 3522 enginelist[p++] = ELM_SOFTWARE_X11;
3520#endif 3523#endif
3521#ifdef HAVE_ELEMENTARY_WAYLAND 3524#ifdef HAVE_ELEMENTARY_WL2
3522 enginelist[p++] = ELM_WAYLAND_SHM; 3525 enginelist[p++] = ELM_WAYLAND_SHM;
3523#endif 3526#endif
3524#ifdef HAVE_ELEMENTARY_WIN32 3527#ifdef HAVE_ELEMENTARY_WIN32
@@ -3545,7 +3548,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
3545#ifdef HAVE_ELEMENTARY_X 3548#ifdef HAVE_ELEMENTARY_X
3546 enginelist[p++] = ELM_SOFTWARE_X11; 3549 enginelist[p++] = ELM_SOFTWARE_X11;
3547#endif 3550#endif
3548#ifdef HAVE_ELEMENTARY_WAYLAND 3551#ifdef HAVE_ELEMENTARY_WL2
3549 enginelist[p++] = ELM_WAYLAND_SHM; 3552 enginelist[p++] = ELM_WAYLAND_SHM;
3550#endif 3553#endif
3551#ifdef HAVE_ELEMENTARY_DRM 3554#ifdef HAVE_ELEMENTARY_DRM
@@ -3567,7 +3570,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
3567#ifdef HAVE_ELEMENTARY_X 3570#ifdef HAVE_ELEMENTARY_X
3568 enginelist[p++] = ELM_OPENGL_X11; 3571 enginelist[p++] = ELM_OPENGL_X11;
3569#endif 3572#endif
3570#ifdef HAVE_ELEMENTARY_WAYLAND 3573#ifdef HAVE_ELEMENTARY_WL2
3571 enginelist[p++] = ELM_WAYLAND_EGL; 3574 enginelist[p++] = ELM_WAYLAND_EGL;
3572#endif 3575#endif
3573#ifdef HAVE_ELEMENTARY_DRM 3576#ifdef HAVE_ELEMENTARY_DRM
@@ -3714,7 +3717,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
3714 } 3717 }
3715#endif 3718#endif
3716 3719
3717#ifdef HAVE_ELEMENTARY_WAYLAND 3720#ifdef HAVE_ELEMENTARY_WL2
3718 _elm_win_wlwindow_get(sd); 3721 _elm_win_wlwindow_get(sd);
3719#endif 3722#endif
3720 3723
@@ -5384,7 +5387,7 @@ _elm_win_xwindow_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
5384 return 0; 5387 return 0;
5385} 5388}
5386 5389
5387EAPI Ecore_Wl_Window * 5390EAPI Ecore_Wl2_Window *
5388elm_win_wl_window_get(const Evas_Object *obj) 5391elm_win_wl_window_get(const Evas_Object *obj)
5389{ 5392{
5390 ELM_WIN_CHECK(obj) NULL; 5393 ELM_WIN_CHECK(obj) NULL;
@@ -5402,15 +5405,15 @@ elm_win_wl_window_get(const Evas_Object *obj)
5402 return _elm_ee_wlwin_get(ee); 5405 return _elm_ee_wlwin_get(ee);
5403 } 5406 }
5404 5407
5405 Ecore_Wl_Window *ret = NULL; 5408 Ecore_Wl2_Window *ret = NULL;
5406 eo_do((Eo *) obj, ret = elm_obj_win_wl_window_get()); 5409 eo_do((Eo *) obj, ret = elm_obj_win_wl_window_get());
5407 return ret; 5410 return ret;
5408} 5411}
5409 5412
5410EOLIAN static Ecore_Wl_Window* 5413EOLIAN static Ecore_Wl2_Window*
5411_elm_win_wl_window_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd) 5414_elm_win_wl_window_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
5412{ 5415{
5413#if HAVE_ELEMENTARY_WAYLAND 5416#if HAVE_ELEMENTARY_WL2
5414 if (sd->wl.win) return sd->wl.win; 5417 if (sd->wl.win) return sd->wl.win;
5415 if (sd->parent) return elm_win_wl_window_get(sd->parent); 5418 if (sd->parent) return elm_win_wl_window_get(sd->parent);
5416#else 5419#else
@@ -5476,14 +5479,16 @@ _elm_win_window_id_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
5476 ((!strcmp(engine_name, ELM_WAYLAND_SHM)) || 5479 ((!strcmp(engine_name, ELM_WAYLAND_SHM)) ||
5477 (!strcmp(engine_name, ELM_WAYLAND_EGL))))) 5480 (!strcmp(engine_name, ELM_WAYLAND_EGL)))))
5478 { 5481 {
5479#if HAVE_ELEMENTARY_WAYLAND 5482#if HAVE_ELEMENTARY_WL2
5480 if (sd->wl.win) return (Ecore_Window)ecore_wl_window_surface_id_get(sd->wl.win); 5483 if (sd->wl.win)
5484 return (Ecore_Window)ecore_wl2_window_surface_id_get(sd->wl.win);
5481 if (sd->parent) 5485 if (sd->parent)
5482 { 5486 {
5483 Ecore_Wl_Window *parent; 5487 Ecore_Wl2_Window *parent;
5484 5488
5485 parent = elm_win_wl_window_get(sd->parent); 5489 parent = elm_win_wl_window_get(sd->parent);
5486 if (parent) return (Ecore_Window)ecore_wl_window_surface_id_get(parent); 5490 if (parent)
5491 return (Ecore_Window)ecore_wl2_window_surface_id_get(parent);
5487 return 0; 5492 return 0;
5488 } 5493 }
5489#endif 5494#endif
diff --git a/src/lib/elm_win.eo b/src/lib/elm_win.eo
index 45410bb1a..c48ff3822 100644
--- a/src/lib/elm_win.eo
+++ b/src/lib/elm_win.eo
@@ -956,8 +956,8 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window,
956 } 956 }
957 @property wl_window { 957 @property wl_window {
958 get { 958 get {
959 [[Get the Ecore_Wl_Window of an Evas_Object.]] 959 [[Get the Ecore_Wl2_Window of an Evas_Object.]]
960 return: Ecore_Wl_Window *; [[The Ecore_Wl_Window of $obj.]] 960 return: Ecore_Wl2_Window *; [[The Ecore_Wl2_Window of $obj.]]
961 legacy: null; 961 legacy: null;
962 } 962 }
963 } 963 }
diff --git a/src/lib/elm_win_legacy.h b/src/lib/elm_win_legacy.h
index 883b3756d..22b0fec11 100644
--- a/src/lib/elm_win_legacy.h
+++ b/src/lib/elm_win_legacy.h
@@ -195,7 +195,7 @@ EAPI void elm_win_render(Evas_Object *obj);
195 * 195 *
196 * @ingroup Win 196 * @ingroup Win
197 */ 197 */
198EAPI Ecore_Wl_Window *elm_win_wl_window_get(const Evas_Object *obj); 198EAPI Ecore_Wl2_Window *elm_win_wl_window_get(const Evas_Object *obj);
199 199
200/** 200/**
201 * Set the preferred rotation value. 201 * Set the preferred rotation value.
diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c
index 4e6a44327..ac6ede256 100644
--- a/src/lib/els_cursor.c
+++ b/src/lib/els_cursor.c
@@ -146,9 +146,9 @@ struct _Elm_Cursor
146 Ecore_X_Window win; 146 Ecore_X_Window win;
147 } x; 147 } x;
148#endif 148#endif
149#ifdef HAVE_ELEMENTARY_WAYLAND 149#ifdef HAVE_ELEMENTARY_WL2
150 struct { 150 struct {
151 Ecore_Wl_Window *win; 151 Ecore_Wl2_Window *win;
152 } wl; 152 } wl;
153#endif 153#endif
154 154
@@ -282,9 +282,9 @@ _elm_cursor_set(Elm_Cursor *cur)
282 if (cur->x.win) 282 if (cur->x.win)
283 ecore_x_window_cursor_set(cur->x.win, cur->x.cursor); 283 ecore_x_window_cursor_set(cur->x.win, cur->x.cursor);
284#endif 284#endif
285#ifdef HAVE_ELEMENTARY_WAYLAND 285#ifdef HAVE_ELEMENTARY_WL2
286 if (cur->wl.win) 286 if (cur->wl.win)
287 ecore_wl_window_cursor_from_name_set(cur->wl.win, cur->cursor_name); 287 ecore_wl2_window_cursor_from_name_set(cur->wl.win, cur->cursor_name);
288#endif 288#endif
289 } 289 }
290 evas_event_thaw(cur->evas); 290 evas_event_thaw(cur->evas);
@@ -340,9 +340,9 @@ _elm_cursor_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_
340 if (cur->x.win) 340 if (cur->x.win)
341 ecore_x_window_cursor_set(cur->x.win, ECORE_X_CURSOR_X); 341 ecore_x_window_cursor_set(cur->x.win, ECORE_X_CURSOR_X);
342#endif 342#endif
343#ifdef HAVE_ELEMENTARY_WAYLAND 343#ifdef HAVE_ELEMENTARY_WL2
344 if (cur->wl.win) 344 if (cur->wl.win)
345 ecore_wl_window_cursor_default_restore(cur->wl.win); 345 ecore_wl2_window_cursor_from_name_set(cur->wl.win, NULL);
346#endif 346#endif
347 } 347 }
348 evas_event_thaw(cur->evas); 348 evas_event_thaw(cur->evas);
@@ -418,7 +418,7 @@ _elm_cursor_cur_set(Elm_Cursor *cur)
418 cur->x.cursor = ecore_x_cursor_shape_get(cur_id->id); 418 cur->x.cursor = ecore_x_cursor_shape_get(cur_id->id);
419 } 419 }
420#endif 420#endif
421#ifdef HAVE_ELEMENTARY_WAYLAND 421#ifdef HAVE_ELEMENTARY_WL2
422 cur->wl.win = elm_win_wl_window_get(top); 422 cur->wl.win = elm_win_wl_window_get(top);
423#endif 423#endif
424 } 424 }
@@ -541,9 +541,9 @@ elm_object_cursor_unset(Evas_Object *obj)
541 else if (cur->x.win) 541 else if (cur->x.win)
542 ecore_x_window_cursor_set(cur->x.win, ECORE_X_CURSOR_X); 542 ecore_x_window_cursor_set(cur->x.win, ECORE_X_CURSOR_X);
543#endif 543#endif
544#ifdef HAVE_ELEMENTARY_WAYLAND 544#ifdef HAVE_ELEMENTARY_WL2
545 else if (cur->wl.win) 545 else if (cur->wl.win)
546 ecore_wl_window_cursor_default_restore(cur->wl.win); 546 ecore_wl2_window_cursor_from_name_set(cur->wl.win, NULL);
547#endif 547#endif
548 } 548 }
549 549