x11: Ignore stray DestroyNotify events

There's no use in making a delete event with a
NULL surface. Just ignore such events.

Fixes: #3006
This commit is contained in:
Matthias Clasen
2020-08-02 22:43:48 -04:00
parent 348a38a876
commit 4152e90e7e

View File

@@ -795,7 +795,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
if (!is_substructure)
{
event = gdk_delete_event_new (surface);
if (surface)
event = gdk_delete_event_new (surface);
if (surface && GDK_SURFACE_XID (surface) != x11_screen->xroot_window)
gdk_surface_destroy_notify (surface);