testsuite: Fix broken test to not unref surfaces twice
authorBenjamin Otte <otte@redhat.com>
Sun, 16 Apr 2023 14:57:48 +0000 (16:57 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 21 Apr 2023 07:26:46 +0000 (09:26 +0200)
The test doesn't hold 2 references, it holds only one.

The reason one unref can cause a leak is that some backends - like X11 -
only destroy the surface once the DestroyNotify event from the X server
has come in.

testsuite/gtk/shortcuts.c

index 10a7913faaa4a4e9a0b01751cce7ca0fede1367e..f4895c5d2e230d3ec54750417094a98cea2ecb58 100644 (file)
@@ -360,7 +360,6 @@ test_trigger_trigger (void)
     }
 
   gdk_surface_destroy (surface);
-  g_object_unref (surface);
 
   g_object_unref (trigger[0]);
   g_object_unref (trigger[1]);