GDK GL context's should associate with "window->impl_window" not "window"
In some layouts this inconsistency results in crashes in gdk_gl_texture_from_surface() since it uses gdk_gl_context_get_window() but the returned window is not the same as the one that is being painted so "window->current_paint.surface" is NULL. I saw this problem when packing a GdkGLArea into a GtkPaned. https://bugzilla.gnome.org/show_bug.cgi?id=743146
This commit is contained in:
committed by
Emmanuele Bassi
parent
27cf0fa34c
commit
00834786be
@ -2737,7 +2737,7 @@ gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
|
|||||||
if (window->impl_window->gl_paint_context == NULL)
|
if (window->impl_window->gl_paint_context == NULL)
|
||||||
{
|
{
|
||||||
window->impl_window->gl_paint_context =
|
window->impl_window->gl_paint_context =
|
||||||
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window,
|
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window->impl_window,
|
||||||
TRUE,
|
TRUE,
|
||||||
GDK_GL_PROFILE_3_2_CORE,
|
GDK_GL_PROFILE_3_2_CORE,
|
||||||
NULL,
|
NULL,
|
||||||
@ -2748,7 +2748,7 @@ gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
|
|||||||
{
|
{
|
||||||
g_clear_error (error);
|
g_clear_error (error);
|
||||||
window->impl_window->gl_paint_context =
|
window->impl_window->gl_paint_context =
|
||||||
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window,
|
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window->impl_window,
|
||||||
TRUE,
|
TRUE,
|
||||||
GDK_GL_PROFILE_DEFAULT,
|
GDK_GL_PROFILE_DEFAULT,
|
||||||
NULL,
|
NULL,
|
||||||
@ -2790,7 +2790,7 @@ gdk_window_create_gl_context (GdkWindow *window,
|
|||||||
if (paint_context == NULL)
|
if (paint_context == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window,
|
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window->impl_window,
|
||||||
FALSE,
|
FALSE,
|
||||||
profile,
|
profile,
|
||||||
paint_context,
|
paint_context,
|
||||||
|
|||||||
Reference in New Issue
Block a user