(info->info.destination_alpha != re->win->alpha) ||
(info->info.rotation != re->win->rot))
{
- Evas_GL_X11_Window *oldwin = re->win;
+ int inc = 0;
+ if (re->win)
+ {
+ re->win->gl_context->shared->references++;
+ eng_window_free(re->win);
+ inc = 1;
+ gl_wins--;
+ }
re->win = eng_window_new(info->info.display,
info->info.drawable,
info->info.screen,
info->info.destination_alpha,
info->info.rotation);
if (re->win) gl_wins++;
- if (oldwin)
- {
- eng_window_free(oldwin);
- gl_wins--;
- }
+ if ((re->win) && (inc))
+ re->win->gl_context->shared->references--;
}
else if ((re->win->w != e->output.w) ||
(re->win->h != e->output.h))