forked from enlightenment/efl
ecore_evas_wayland: Make transparent_set common
Moves transparent set into the common implementation - there is a functional change here - the egl engine now calls transparent_set in render_updates like the shm engine. It is probable the this was the intended behaviour all along.
This commit is contained in:
parent
9ca6e274a4
commit
5d2a25a01d
|
@ -1821,18 +1821,6 @@ _ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_ecore_evas_wayland_transparent_do(Ecore_Evas *ee, int transparent)
|
|
||||||
{
|
|
||||||
if (!ee) return;
|
|
||||||
if (!strcmp(ee->driver, "wayland_shm"))
|
|
||||||
{
|
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
|
||||||
_ecore_evas_wayland_shm_transparent_do(ee, transparent);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y)
|
_ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y)
|
||||||
{
|
{
|
||||||
|
@ -2035,3 +2023,46 @@ _ecore_evas_wl_common_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
|
|
||||||
_ecore_evas_wayland_alpha_do(ee, alpha);
|
_ecore_evas_wayland_alpha_do(ee, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ecore_evas_wayland_transparent_do(Ecore_Evas *ee, int transparent)
|
||||||
|
{
|
||||||
|
Evas_Engine_Info_Wayland *einfo;
|
||||||
|
Ecore_Evas_Engine_Wl_Data *wdata;
|
||||||
|
int fw, fh;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
if (!ee) return;
|
||||||
|
if (ee->transparent == transparent) return;
|
||||||
|
ee->transparent = transparent;
|
||||||
|
|
||||||
|
wdata = ee->engine.data;
|
||||||
|
if (!wdata->sync_done) return;
|
||||||
|
|
||||||
|
if (wdata->win)
|
||||||
|
ecore_wl2_window_transparent_set(wdata->win, ee->transparent);
|
||||||
|
|
||||||
|
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
|
||||||
|
|
||||||
|
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
||||||
|
{
|
||||||
|
einfo->info.destination_alpha = EINA_TRUE;
|
||||||
|
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
|
||||||
|
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
||||||
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_ecore_evas_wl_common_transparent_set(Ecore_Evas *ee, int transparent)
|
||||||
|
{
|
||||||
|
if (ee->in_async_render)
|
||||||
|
{
|
||||||
|
ee->delayed.transparent = transparent;
|
||||||
|
ee->delayed.transparent_changed = EINA_TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ecore_evas_wayland_transparent_do(ee, transparent);
|
||||||
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ extern EAPI Eina_List *_evas_canvas_image_data_unset(Evas *eo_e);
|
||||||
extern EAPI void _evas_canvas_image_data_regenerate(Eina_List *list);
|
extern EAPI void _evas_canvas_image_data_regenerate(Eina_List *list);
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
|
|
||||||
static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize);
|
static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize);
|
||||||
|
|
||||||
static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
|
static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
|
||||||
|
@ -85,7 +84,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
|
||||||
NULL, // func sticky set
|
NULL, // func sticky set
|
||||||
_ecore_evas_wl_common_ignore_events_set,
|
_ecore_evas_wl_common_ignore_events_set,
|
||||||
_ecore_evas_wl_common_alpha_set,
|
_ecore_evas_wl_common_alpha_set,
|
||||||
_ecore_evas_wl_transparent_set,
|
_ecore_evas_wl_common_transparent_set,
|
||||||
NULL, // func profiles set
|
NULL, // func profiles set
|
||||||
NULL, // func profile set
|
NULL, // func profile set
|
||||||
NULL, // window group set
|
NULL, // window group set
|
||||||
|
@ -466,49 +465,6 @@ _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize)
|
||||||
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_ecore_evas_wayland_egl_transparent_do(Ecore_Evas *ee, int transparent)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_Wayland *einfo;
|
|
||||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
|
||||||
int fw, fh;
|
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
if (!ee) return;
|
|
||||||
if (ee->transparent == transparent) return;
|
|
||||||
ee->transparent = transparent;
|
|
||||||
|
|
||||||
wdata = ee->engine.data;
|
|
||||||
if (!wdata->sync_done) return;
|
|
||||||
|
|
||||||
if (wdata->win)
|
|
||||||
ecore_wl2_window_transparent_set(wdata->win, ee->transparent);
|
|
||||||
|
|
||||||
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
|
|
||||||
|
|
||||||
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
|
||||||
{
|
|
||||||
einfo->info.destination_alpha = EINA_TRUE;
|
|
||||||
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
|
|
||||||
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
|
||||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
|
|
||||||
{
|
|
||||||
if (ee->in_async_render)
|
|
||||||
{
|
|
||||||
ee->delayed.transparent = transparent;
|
|
||||||
ee->delayed.transparent_changed = EINA_TRUE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_ecore_evas_wayland_egl_transparent_do(ee, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
|
_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,6 +99,7 @@ void _ecore_evas_wl_common_withdrawn_set(Ecore_Evas *ee, Eina_Bool on);
|
||||||
void _ecore_evas_wl_common_show(Ecore_Evas *ee);
|
void _ecore_evas_wl_common_show(Ecore_Evas *ee);
|
||||||
void _ecore_evas_wl_common_hide(Ecore_Evas *ee);
|
void _ecore_evas_wl_common_hide(Ecore_Evas *ee);
|
||||||
void _ecore_evas_wl_common_alpha_set(Ecore_Evas *ee, int alpha);
|
void _ecore_evas_wl_common_alpha_set(Ecore_Evas *ee, int alpha);
|
||||||
|
void _ecore_evas_wl_common_transparent_set(Ecore_Evas *ee, int transparent);
|
||||||
|
|
||||||
void _ecore_evas_wl_common_frame_callback_clean(Ecore_Evas *ee);
|
void _ecore_evas_wl_common_frame_callback_clean(Ecore_Evas *ee);
|
||||||
|
|
||||||
|
@ -112,7 +113,6 @@ extern Eina_List *ee_list;
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
||||||
void _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location);
|
void _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location);
|
||||||
void _ecore_evas_wayland_shm_resize_edge_set(Ecore_Evas *ee, int edge);
|
void _ecore_evas_wayland_shm_resize_edge_set(Ecore_Evas *ee, int edge);
|
||||||
void _ecore_evas_wayland_shm_transparent_do(Ecore_Evas *ee, int transparent);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
|
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#endif /* ! _WIN32 */
|
#endif /* ! _WIN32 */
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
|
|
||||||
static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize);
|
static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize);
|
||||||
|
|
||||||
static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
|
static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
|
||||||
|
@ -82,7 +81,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
|
||||||
NULL, // func sticky set
|
NULL, // func sticky set
|
||||||
_ecore_evas_wl_common_ignore_events_set,
|
_ecore_evas_wl_common_ignore_events_set,
|
||||||
_ecore_evas_wl_common_alpha_set,
|
_ecore_evas_wl_common_alpha_set,
|
||||||
_ecore_evas_wl_transparent_set,
|
_ecore_evas_wl_common_transparent_set,
|
||||||
NULL, // func profiles set
|
NULL, // func profiles set
|
||||||
NULL, // func profile set
|
NULL, // func profile set
|
||||||
NULL, // window group set
|
NULL, // window group set
|
||||||
|
@ -395,48 +394,6 @@ _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize)
|
||||||
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_ecore_evas_wayland_shm_transparent_do(Ecore_Evas *ee, int transparent)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_Wayland *einfo;
|
|
||||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
|
||||||
int fw, fh;
|
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
if (!ee) return;
|
|
||||||
if (ee->transparent == transparent) return;
|
|
||||||
ee->transparent = transparent;
|
|
||||||
|
|
||||||
wdata = ee->engine.data;
|
|
||||||
if (!wdata->sync_done) return;
|
|
||||||
|
|
||||||
if (wdata->win)
|
|
||||||
ecore_wl2_window_transparent_set(wdata->win, ee->transparent);
|
|
||||||
|
|
||||||
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
|
|
||||||
|
|
||||||
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
|
||||||
{
|
|
||||||
einfo->info.destination_alpha = EINA_TRUE;//ee->transparent;
|
|
||||||
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
|
|
||||||
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
|
||||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
|
|
||||||
{
|
|
||||||
if (ee->in_async_render)
|
|
||||||
{
|
|
||||||
ee->delayed.transparent = transparent;
|
|
||||||
ee->delayed.transparent_changed = EINA_TRUE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_ecore_evas_wayland_shm_transparent_do(ee, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
|
_ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue