From 8a5e044e55c0ffb265a21921a9d4dc07c6f7c9fc Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Wed, 3 Jul 2013 16:44:00 +0800 Subject: [PATCH] vkbd-efl integration: Fix black bar of vkbd-efl Backport upstream efl 7a7a0b829734a9 related code. Add Add ecore_wl_window_alpha_set(), modify the check condition for setting opaque region Change-Id: I6f788a52462e8fd128444f913af7a2b842fa7a82 --- src/lib/ecore_evas/ecore_evas_wayland_egl.c | 2 ++ src/lib/ecore_wayland/Ecore_Wayland.h | 1 + src/lib/ecore_wayland/ecore_wl_window.c | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas_wayland_egl.c b/src/lib/ecore_evas/ecore_evas_wayland_egl.c index 71999cb..0075865 100644 --- a/src/lib/ecore_evas/ecore_evas_wayland_egl.c +++ b/src/lib/ecore_evas/ecore_evas_wayland_egl.c @@ -405,6 +405,8 @@ _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha) if (!ee) return; if ((ee->alpha == alpha)) return; ee->alpha = alpha; + if (ee->engine.wl.win) ecore_wl_window_alpha_set(ee->engine.wl.win, alpha); + if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) { einfo->info.destination_alpha = alpha; diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h index 1b6dc89..7f94e27 100644 --- a/src/lib/ecore_wayland/Ecore_Wayland.h +++ b/src/lib/ecore_wayland/Ecore_Wayland.h @@ -383,6 +383,7 @@ EAPI void ecore_wl_window_raise(Ecore_Wl_Window *win); EAPI void ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized); EAPI void ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen); EAPI void ecore_wl_window_transparent_set(Ecore_Wl_Window *win, Eina_Bool transparent); +EAPI void ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool alpha); EAPI void ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h); EAPI void ecore_wl_window_update_location(Ecore_Wl_Window *win, int x, int y); EAPI struct wl_surface *ecore_wl_window_surface_get(Ecore_Wl_Window *win); diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 48e0d6e..e7473d3 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c @@ -242,7 +242,7 @@ ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int location) win->allocation.w, win->allocation.h); } - if (!win->transparent) + if ((!win->transparent) && (!win->alpha)) { win->region.opaque = wl_compositor_create_region(_ecore_wl_disp->wl.compositor); @@ -536,6 +536,16 @@ ecore_wl_window_transparent_set(Ecore_Wl_Window *win, Eina_Bool transparent) } } +EAPI void +ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool alpha) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!win) return; + win->alpha = alpha; + ecore_wl_window_update_size(win, win->allocation.w, win->allocation.h); +} + EAPI void ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h) { @@ -545,7 +555,7 @@ ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h) win->allocation.w = w; win->allocation.h = h; - if ((!win->transparent) || (!win->alpha)) + if ((!win->transparent) && (!win->alpha)) { if (win->region.opaque) wl_region_destroy(win->region.opaque); win->region.opaque = -- 2.7.4