[gtk+] GDK GL context's should associate with "window->impl_window" not "window"
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GDK GL context's should associate with "window->impl_window" not "window"
- Date: Wed, 28 Jan 2015 12:01:13 +0000 (UTC)
commit 00834786be3b280dd048d234ee6bb188d01e1ff8
Author: Niels Nesse <nnesse sonic net>
Date: Sat Jan 17 23:21:35 2015 -0800
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
gdk/gdkwindow.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index a3a2d64..778fd5f 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2737,7 +2737,7 @@ gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
if (window->impl_window->gl_paint_context == NULL)
{
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,
GDK_GL_PROFILE_3_2_CORE,
NULL,
@@ -2748,7 +2748,7 @@ gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
{
g_clear_error (error);
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,
GDK_GL_PROFILE_DEFAULT,
NULL,
@@ -2790,7 +2790,7 @@ gdk_window_create_gl_context (GdkWindow *window,
if (paint_context == 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,
profile,
paint_context,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]