forked from enlightenment/efl
parent
d516be0740
commit
5dfbd6c396
|
@ -1715,8 +1715,18 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
|
||||||
static void
|
static void
|
||||||
_ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
_ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
{
|
{
|
||||||
|
# ifdef HAVE_ECORE_X_XCB
|
||||||
|
xcb_get_geometry_cookie_t cookie_geom;
|
||||||
|
xcb_get_window_attributes_cookie_t cookie_attr;
|
||||||
|
xcb_get_geometry_reply_t *reply_geom;
|
||||||
|
xcb_get_window_attributes_reply_t *reply_attr;
|
||||||
|
#else
|
||||||
|
XWindowAttributes att;
|
||||||
|
#endif /* HAVE_ECORE_X_XCB */
|
||||||
|
|
||||||
if (((ee->alpha) && (alpha)) || ((!ee->alpha) && (!alpha)))
|
if (((ee->alpha) && (alpha)) || ((!ee->alpha) && (!alpha)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!strcmp(ee->driver, "software_x11") || !strcmp(ee->driver, "software_xcb"))
|
if (!strcmp(ee->driver, "software_x11") || !strcmp(ee->driver, "software_xcb"))
|
||||||
{
|
{
|
||||||
#ifdef BUILD_ECORE_X
|
#ifdef BUILD_ECORE_X
|
||||||
|
@ -1729,16 +1739,8 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
|
|
||||||
einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(ee->evas);
|
einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(ee->evas);
|
||||||
#endif /* HAVE_ECORE_X_XCB */
|
#endif /* HAVE_ECORE_X_XCB */
|
||||||
if (einfo)
|
|
||||||
{
|
if (!einfo) return;
|
||||||
# ifdef HAVE_ECORE_X_XCB
|
|
||||||
xcb_get_geometry_cookie_t cookie_geom;
|
|
||||||
xcb_get_window_attributes_cookie_t cookie_attr;
|
|
||||||
xcb_get_geometry_reply_t *reply_geom;
|
|
||||||
xcb_get_window_attributes_reply_t *reply_attr;
|
|
||||||
#else
|
|
||||||
XWindowAttributes att;
|
|
||||||
#endif /* HAVE_ECORE_X_XCB */
|
|
||||||
|
|
||||||
ee->shaped = 0;
|
ee->shaped = 0;
|
||||||
ee->alpha = alpha;
|
ee->alpha = alpha;
|
||||||
|
@ -1750,7 +1752,6 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
ee->engine.x.win = ecore_x_window_override_argb_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
ee->engine.x.win = ecore_x_window_override_argb_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
||||||
else
|
else
|
||||||
ee->engine.x.win = ecore_x_window_argb_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
ee->engine.x.win = ecore_x_window_argb_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
||||||
einfo->info.destination_alpha = 1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1758,8 +1759,10 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
ee->engine.x.win = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
ee->engine.x.win = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
||||||
else
|
else
|
||||||
ee->engine.x.win = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
ee->engine.x.win = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
||||||
einfo->info.destination_alpha = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
einfo->info.destination_alpha = alpha;
|
||||||
|
|
||||||
# ifdef HAVE_ECORE_X_XCB
|
# ifdef HAVE_ECORE_X_XCB
|
||||||
cookie_geom = xcb_get_geometry_unchecked(ecore_x_connection_get(), ee->engine.x.win);
|
cookie_geom = xcb_get_geometry_unchecked(ecore_x_connection_get(), ee->engine.x.win);
|
||||||
cookie_attr = xcb_get_window_attributes_unchecked(ecore_x_connection_get(), ee->engine.x.win);
|
cookie_attr = xcb_get_window_attributes_unchecked(ecore_x_connection_get(), ee->engine.x.win);
|
||||||
|
@ -1777,6 +1780,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
einfo->info.colormap = att.colormap;
|
einfo->info.colormap = att.colormap;
|
||||||
einfo->info.depth = att.depth;
|
einfo->info.depth = att.depth;
|
||||||
# endif /* HAVE_ECORE_X_XCB */
|
# endif /* HAVE_ECORE_X_XCB */
|
||||||
|
|
||||||
if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
|
if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
|
||||||
ee->engine.x.mask = 0;
|
ee->engine.x.mask = 0;
|
||||||
einfo->info.mask = 0;
|
einfo->info.mask = 0;
|
||||||
|
@ -1789,7 +1793,6 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
ecore_x_mwm_borderless_set(ee->engine.x.win, ee->prop.borderless);
|
ecore_x_mwm_borderless_set(ee->engine.x.win, ee->prop.borderless);
|
||||||
if (ee->visible) ecore_x_window_show(ee->engine.x.win);
|
if (ee->visible) ecore_x_window_show(ee->engine.x.win);
|
||||||
if (ee->prop.focused) ecore_x_window_focus(ee->engine.x.win);
|
if (ee->prop.focused) ecore_x_window_focus(ee->engine.x.win);
|
||||||
}
|
|
||||||
#endif /* BUILD_ECORE_X */
|
#endif /* BUILD_ECORE_X */
|
||||||
}
|
}
|
||||||
else if (!strcmp(ee->driver, "xrender_x11") || !strcmp(ee->driver, "xrender_xcb"))
|
else if (!strcmp(ee->driver, "xrender_x11") || !strcmp(ee->driver, "xrender_xcb"))
|
||||||
|
@ -1804,15 +1807,11 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
|
|
||||||
einfo = (Evas_Engine_Info_XRender_X11 *)evas_engine_info_get(ee->evas);
|
einfo = (Evas_Engine_Info_XRender_X11 *)evas_engine_info_get(ee->evas);
|
||||||
# endif /* HAVE_ECORE_X_XCB */
|
# endif /* HAVE_ECORE_X_XCB */
|
||||||
if (einfo)
|
|
||||||
{
|
|
||||||
# ifdef HAVE_ECORE_X_XCB
|
|
||||||
xcb_get_window_attributes_cookie_t cookie_attr;
|
|
||||||
xcb_get_window_attributes_reply_t *reply_attr;
|
|
||||||
|
|
||||||
|
if (!einfo) return;
|
||||||
|
|
||||||
|
# ifdef HAVE_ECORE_X_XCB
|
||||||
cookie_attr = xcb_get_window_attributes_unchecked(ecore_x_connection_get(), ee->engine.x.win);
|
cookie_attr = xcb_get_window_attributes_unchecked(ecore_x_connection_get(), ee->engine.x.win);
|
||||||
# else
|
|
||||||
XWindowAttributes att;
|
|
||||||
# endif /* HAVE_ECORE_X_XCB */
|
# endif /* HAVE_ECORE_X_XCB */
|
||||||
|
|
||||||
ee->shaped = 0;
|
ee->shaped = 0;
|
||||||
|
@ -1825,7 +1824,6 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
ee->engine.x.win = ecore_x_window_override_argb_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
ee->engine.x.win = ecore_x_window_override_argb_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
||||||
else
|
else
|
||||||
ee->engine.x.win = ecore_x_window_argb_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
ee->engine.x.win = ecore_x_window_argb_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
||||||
einfo->info.destination_alpha = 1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1833,8 +1831,10 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
ee->engine.x.win = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
ee->engine.x.win = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
||||||
else
|
else
|
||||||
ee->engine.x.win = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
ee->engine.x.win = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
|
||||||
einfo->info.destination_alpha = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
einfo->info.destination_alpha = alpha;
|
||||||
|
|
||||||
# ifdef HAVE_ECORE_X_XCB
|
# ifdef HAVE_ECORE_X_XCB
|
||||||
reply_attr = xcb_get_window_attributes_reply(ecore_x_connection_get(), cookie_attr, NULL);
|
reply_attr = xcb_get_window_attributes_reply(ecore_x_connection_get(), cookie_attr, NULL);
|
||||||
|
|
||||||
|
@ -1844,6 +1844,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
XGetWindowAttributes(ecore_x_display_get(), ee->engine.x.win, &att);
|
XGetWindowAttributes(ecore_x_display_get(), ee->engine.x.win, &att);
|
||||||
einfo->info.visual = att.visual;
|
einfo->info.visual = att.visual;
|
||||||
# endif /* HAVE_ECORE_X_XCB */
|
# endif /* HAVE_ECORE_X_XCB */
|
||||||
|
|
||||||
if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
|
if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
|
||||||
ee->engine.x.mask = 0;
|
ee->engine.x.mask = 0;
|
||||||
einfo->info.mask = 0;
|
einfo->info.mask = 0;
|
||||||
|
@ -1856,7 +1857,6 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
ecore_x_mwm_borderless_set(ee->engine.x.win, ee->prop.borderless);
|
ecore_x_mwm_borderless_set(ee->engine.x.win, ee->prop.borderless);
|
||||||
if (ee->visible) ecore_x_window_show(ee->engine.x.win);
|
if (ee->visible) ecore_x_window_show(ee->engine.x.win);
|
||||||
if (ee->prop.focused) ecore_x_window_focus(ee->engine.x.win);
|
if (ee->prop.focused) ecore_x_window_focus(ee->engine.x.win);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue