forked from enlightenment/efl
ecore/wayland: Fix alpha windows on EGL backend.
Now the opaque and input regions are updated on ecore_wl_window_resize, there's no need to call ecore_wl_window_buffer_attach() for this anymore. The checks on alpha and transparent flags were also fixed. ecore_wl_window_update_size() is now called by ecore_wl_window_resize(), reducing duplicated code.
This commit is contained in:
parent
7a7a0b8297
commit
13c0e8f3f3
|
@ -1,3 +1,8 @@
|
|||
2013-05-06 Rafael Antognolli
|
||||
|
||||
* Ecore/Wayland: Add ecore_wl_window_alpha_set/get().
|
||||
* Ecore/Wayland: Fix alpha windows on EGL backend.
|
||||
|
||||
2013-05-06 Cedric Bail
|
||||
|
||||
* Evas: Remove SVG loader from inside the merged tree.
|
||||
|
|
1
NEWS
1
NEWS
|
@ -53,6 +53,7 @@ Additions:
|
|||
- Add #ifdef __cplusplus to Ecore_Wayland.h so C++ programs can link to
|
||||
and use the API.
|
||||
- Add support for double and triple click.
|
||||
- Add ecore_wl_window_alpha_set/get().
|
||||
* ecore_evas:
|
||||
- ecore_evas_window_profile_supported_get()
|
||||
- ecore_evas_window_profile_set()
|
||||
|
|
|
@ -161,13 +161,7 @@ ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int location)
|
|||
win->allocation.w, win->allocation.h);
|
||||
}
|
||||
|
||||
if (!win->transparent)
|
||||
{
|
||||
win->region.opaque =
|
||||
wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
|
||||
wl_region_add(win->region.opaque, win->allocation.x, win->allocation.y,
|
||||
win->allocation.w, win->allocation.h);
|
||||
}
|
||||
ecore_wl_window_update_size(win, w, h);
|
||||
|
||||
if (win->shell_surface)
|
||||
{
|
||||
|
@ -187,6 +181,22 @@ ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int location)
|
|||
wl_shell_surface_resize(win->shell_surface, input->seat,
|
||||
input->display->serial, location);
|
||||
}
|
||||
|
||||
if (win->region.input)
|
||||
{
|
||||
if (win->surface)
|
||||
wl_surface_set_input_region(win->surface, win->region.input);
|
||||
wl_region_destroy(win->region.input);
|
||||
win->region.input = NULL;
|
||||
}
|
||||
|
||||
if (win->surface)
|
||||
wl_surface_set_opaque_region(win->surface, win->region.opaque);
|
||||
if (win->region.opaque)
|
||||
{
|
||||
wl_region_destroy(win->region.opaque);
|
||||
win->region.opaque = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -242,22 +252,6 @@ ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, in
|
|||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (win->region.input)
|
||||
{
|
||||
if (win->surface)
|
||||
wl_surface_set_input_region(win->surface, win->region.input);
|
||||
wl_region_destroy(win->region.input);
|
||||
win->region.input = NULL;
|
||||
}
|
||||
|
||||
if (win->region.opaque)
|
||||
{
|
||||
if (win->surface)
|
||||
wl_surface_set_opaque_region(win->surface, win->region.opaque);
|
||||
wl_region_destroy(win->region.opaque);
|
||||
win->region.opaque = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
EAPI struct wl_surface*
|
||||
|
@ -445,7 +439,7 @@ ecore_wl_window_transparent_set(Ecore_Wl_Window *win, Eina_Bool transparent)
|
|||
win->transparent = transparent;
|
||||
if (win->region.opaque) wl_region_destroy(win->region.opaque);
|
||||
win->region.opaque = NULL;
|
||||
if (!win->transparent)
|
||||
if ((!win->transparent) && (!win->alpha))
|
||||
{
|
||||
win->region.opaque =
|
||||
wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
|
||||
|
@ -501,14 +495,18 @@ 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->region.opaque) wl_region_destroy(win->region.opaque);
|
||||
|
||||
if ((!win->transparent) && (!win->alpha))
|
||||
{
|
||||
if (win->region.opaque) wl_region_destroy(win->region.opaque);
|
||||
win->region.opaque =
|
||||
wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
|
||||
wl_region_add(win->region.opaque, win->allocation.x, win->allocation.y,
|
||||
win->allocation.w, win->allocation.h);
|
||||
}
|
||||
else
|
||||
win->region.opaque = NULL;
|
||||
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -295,12 +295,10 @@ _rotation_do(Ecore_Evas *ee, int rotation, int resize)
|
|||
if ((rotation == 0) || (rotation == 180))
|
||||
{
|
||||
ecore_wl_window_resize(wdata->win, ee->h + fw, ee->w + fh, 0);
|
||||
ecore_wl_window_update_size(wdata->win, ee->h + fw, ee->w + fh);
|
||||
}
|
||||
else
|
||||
{
|
||||
ecore_wl_window_resize(wdata->win, ee->h + fh, ee->w + fw, 0);
|
||||
ecore_wl_window_update_size(wdata->win, ee->h + fh, ee->w + fw);
|
||||
}
|
||||
if ((ee->rotation == 0) || (ee->rotation == 180))
|
||||
{
|
||||
|
|
|
@ -507,12 +507,10 @@ _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
|
|||
if ((ee->rotation == 0) || (ee->rotation == 180))
|
||||
{
|
||||
ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, location);
|
||||
ecore_wl_window_update_size(wdata->win, ee->w + fw, ee->h + fh);
|
||||
}
|
||||
else
|
||||
{
|
||||
ecore_wl_window_resize(wdata->win, ee->w + fh, ee->h + fw, location);
|
||||
ecore_wl_window_update_size(wdata->win, ee->w + fh, ee->h + fw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue