diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 7e1a079333..08445870e8 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -3903,6 +3903,7 @@ gdk_window_withdraw (GdkWindow *window) { GdkWindowImplClass *impl_class; gboolean was_mapped; + GdkGLContext *current_context; g_return_if_fail (GDK_IS_WINDOW (window)); @@ -3925,6 +3926,10 @@ gdk_window_withdraw (GdkWindow *window) _gdk_make_event (window, GDK_UNMAP, NULL, FALSE); } + current_context = gdk_gl_context_get_current (); + if (current_context != NULL && gdk_gl_context_get_window (current_context) == window) + gdk_gl_context_clear_current (); + recompute_visible_regions (window, FALSE); gdk_window_clear_old_updated_area (window); }