surface: Use correct display when destroying a surface for depth switch
authorSebastian Keller <skeller@gnome.org>
Tue, 22 Mar 2022 07:11:18 +0000 (08:11 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 21 Apr 2022 23:14:32 +0000 (19:14 -0400)
commit018bbd67742d3b9b75eaa22b10f63ed11e0cab2d
tree4d20ca4150a764a97f29c7a01cebcc10b9b9851b
parente50e2136d2bffbb6df64371af67bfe699366df10
surface: Use correct display when destroying a surface for depth switch

When surface depth switches from non-high-depth to high-depth (or vice
versa) the current surface has to be destroyed before a new one can be
created for this window. eglDestroySurface however was getting passed a
GdkDisplay, rather than the EGLDisplay it expects. As a result the old
surface did not get destroyed and the new surface could not be created
causing rendering to freeze.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4773
gdk/gdksurface.c