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)
committerSebastian Keller <skeller@gnome.org>
Tue, 22 Mar 2022 07:18:26 +0000 (08:18 +0100)
commitcc02076b75115c799e029e5728e9fe65cab41ed0
tree44f7969557d096fc2c0eb9f444e1cbe4c9553ad7
parent654ae5928ab621247bcc43816887c90178990d16
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