Fix opaque windows becoming transparent after hide() then show().

This fixes Phab #T611. Previously, windows which were opaque would
become transparent after being hidden and then shown. We fix that by a
call to ecore_wl_window_alpha_set when the window gets shown. This
patch also brings the wayland_egl hide code more inline with the shm
hide code by testing if the surface does not match the existing one.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-12-09 07:32:45 +00:00
parent 1ae7a4f5e2
commit 13caf63420
2 changed files with 12 additions and 2 deletions

View File

@ -299,13 +299,21 @@ _ecore_evas_wl_show(Ecore_Evas *ee)
if (wdata->win)
{
ecore_wl_window_show(wdata->win);
ecore_wl_window_alpha_set(wdata->win, ee->alpha);
ecore_wl_window_update_size(wdata->win, ee->w + fw, ee->h + fh);
einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas);
if (einfo)
{
einfo->info.surface = ecore_wl_window_surface_get(wdata->win);
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
struct wl_surface *surf;
surf = ecore_wl_window_surface_get(wdata->win);
if ((!einfo->info.surface) || (einfo->info.surface != surf))
{
einfo->info.surface = surf;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
}
}
}

View File

@ -292,6 +292,7 @@ _ecore_evas_wl_show(Ecore_Evas *ee)
if (wdata->win)
{
ecore_wl_window_show(wdata->win);
ecore_wl_window_alpha_set(wdata->win, ee->alpha);
ecore_wl_window_update_size(wdata->win, ee->w + fw, ee->h + fh);
einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas);
@ -304,6 +305,7 @@ _ecore_evas_wl_show(Ecore_Evas *ee)
{
einfo->info.wl_surface = surf;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
}
}
}