summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-11 12:23:53 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-11 12:36:48 -0500
commit6d51e0b1f3cb84e6796790a8183a21ba7d3dc190 (patch)
tree344a477f67df95592bddb44fced836a4a0b1925d /src
parent755c50a84e58d95cbb2ba85f6474bc0a7bc0774f (diff)
ecore-evas-wayland: Add handler for window_configure_complete event
Small patch to add a handler so we can listen for when the surface configure event is complete and can then go ahead and attach buffers to the surface. This allows rage <filename> to work again in Weston :) NB: This does allow rage <filename> to work under Weston now, but still fails under Enlightenment for some reason :( ref T5090 Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 11e04d92e3..7943499eaa 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -113,7 +113,7 @@ struct _EE_Wl_Device
113 113
114/* local variables */ 114/* local variables */
115static int _ecore_evas_wl_init_count = 0; 115static int _ecore_evas_wl_init_count = 0;
116static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[12]; 116static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[13];
117 117
118static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location); 118static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
119 119
@@ -304,6 +304,31 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
304 return ECORE_CALLBACK_PASS_ON; 304 return ECORE_CALLBACK_PASS_ON;
305} 305}
306 306
307static Eina_Bool
308_ecore_evas_wl_common_cb_window_configure_complete(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
309{
310 Ecore_Evas *ee;
311 Ecore_Wl2_Event_Window_Configure_Complete *ev;
312 Evas_Engine_Info_Wayland *einfo;
313
314 LOGFN(__FILE__, __LINE__, __FUNCTION__);
315
316 ev = event;
317 ee = ecore_event_window_match(ev->win);
318 if (!ee) return ECORE_CALLBACK_PASS_ON;
319
320 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
321
322 einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
323 if (!einfo) return ECORE_CALLBACK_PASS_ON;
324
325 einfo->info.hidden = EINA_FALSE;
326 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
327 ERR("Failed to set Evas Engine Info for '%s'", ee->driver);
328
329 return ECORE_CALLBACK_PASS_ON;
330}
331
307static void 332static void
308_mouse_move_dispatch(Ecore_Evas *ee) 333_mouse_move_dispatch(Ecore_Evas *ee)
309{ 334{
@@ -823,6 +848,10 @@ _ecore_evas_wl_common_init(void)
823 ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED, 848 ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_CAPABILITIES_CHANGED,
824 _ecore_evas_wl_common_cb_seat_capabilities_changed, 849 _ecore_evas_wl_common_cb_seat_capabilities_changed,
825 NULL); 850 NULL);
851 _ecore_evas_wl_event_hdls[12] =
852 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
853 _ecore_evas_wl_common_cb_window_configure_complete,
854 NULL);
826 855
827 ecore_event_evas_init(); 856 ecore_event_evas_init();
828 857
@@ -1740,7 +1769,7 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee)
1740 if (einfo) 1769 if (einfo)
1741 { 1770 {
1742 einfo->info.wl_surface = ecore_wl2_window_surface_get(wdata->win); 1771 einfo->info.wl_surface = ecore_wl2_window_surface_get(wdata->win);
1743 einfo->info.hidden = EINA_FALSE; 1772 einfo->info.hidden = wdata->win->pending.configure; //EINA_FALSE;
1744 einfo->www_avail = !!wdata->win->www_surface; 1773 einfo->www_avail = !!wdata->win->www_surface;
1745 einfo->just_mapped = EINA_TRUE; 1774 einfo->just_mapped = EINA_TRUE;
1746 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) 1775 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
@@ -2204,6 +2233,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
2204 einfo->info.wl_shm = ecore_wl2_display_shm_get(ewd); 2233 einfo->info.wl_shm = ecore_wl2_display_shm_get(ewd);
2205 einfo->info.compositor_version = 2234 einfo->info.compositor_version =
2206 ecore_wl2_display_compositor_version_get(ewd); 2235 ecore_wl2_display_compositor_version_get(ewd);
2236 einfo->info.hidden = EINA_TRUE;
2207 2237
2208 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) 2238 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
2209 { 2239 {