From d64e3a27e510abfb8377d636fb72f30842c9af89 Mon Sep 17 00:00:00 2001 From: "Eduardo Lima (Etrunko)" Date: Mon, 20 Oct 2014 11:34:53 -0200 Subject: [PATCH] Revert "evas: GL_X11 context need to always be with alpha or it will fail to change." This reverts commit 12eeebb5447cd9ea8227ac715e0fd55a2fdadaf8. --- src/modules/evas/engines/gl_x11/evas_engine.c | 1 - src/modules/evas/engines/gl_x11/evas_engine.h | 2 +- src/modules/evas/engines/gl_x11/evas_x_main.c | 15 ++++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index a27cf30851..e1caf3a19e 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -942,7 +942,6 @@ eng_setup(Evas *eo_e, void *in) { inc = 1; eng_window_free(re->win); - re->win->gl_context->references++; gl_wins--; } re->w = e->output.w; diff --git a/src/modules/evas/engines/gl_x11/evas_engine.h b/src/modules/evas/engines/gl_x11/evas_engine.h index 9a222bafa0..c03950b907 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.h +++ b/src/modules/evas/engines/gl_x11/evas_engine.h @@ -94,7 +94,7 @@ struct _Evas_GL_X11_Window Evas_GL_X11_Window *eng_window_new(Display *disp, Window win, int screen, Visual *vis, Colormap cmap, int depth, int w, int h, int indirect, - int rot); + int alpha, int rot); void eng_window_free(Evas_GL_X11_Window *gw); void eng_window_use(Evas_GL_X11_Window *gw); void eng_window_unsurf(Evas_GL_X11_Window *gw); diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c index ad81f9982e..1b7cab645b 100644 --- a/src/modules/evas/engines/gl_x11/evas_x_main.c +++ b/src/modules/evas/engines/gl_x11/evas_x_main.c @@ -32,6 +32,7 @@ eng_window_new(Display *disp, int w, int h, int indirect, + int alpha, int rot) { Evas_GL_X11_Window *gw; @@ -57,7 +58,7 @@ eng_window_new(Display *disp, gw->visual = vis; gw->colormap = cmap; gw->depth = depth; - gw->alpha = 1; + gw->alpha = alpha; gw->w = w; gw->h = h; gw->rot = rot; @@ -101,8 +102,16 @@ eng_window_new(Display *disp, config_attrs[n++] = 1; // FIXME: end n900 breakage # endif - config_attrs[n++] = EGL_ALPHA_SIZE; - config_attrs[n++] = 1; + if (gw->alpha) + { + config_attrs[n++] = EGL_ALPHA_SIZE; + config_attrs[n++] = 1; + } + else + { + config_attrs[n++] = EGL_ALPHA_SIZE; + config_attrs[n++] = 0; + } config_attrs[n++] = EGL_DEPTH_SIZE; config_attrs[n++] = 0; config_attrs[n++] = EGL_STENCIL_SIZE;