Resource leak in gdk_display_close()
Steps to reproduce
- call gdk_display_open()
- call gdk_display_close()
- repeat
Current behavior
Under X11: After some time, the gdk_display_open() fails with error "reached maximum number of clients"
Under Wayland: no error
Expected outcome
Should not have any error under X11
Version information
Found with 3.98. Reproduced with sources built from master
Cannot see this issue with GDK3 (3.24)
Additional information
- under Wayland, the same issue used to happen, but I could fix it with 665955b8.
- under X11, the gdk_x11_display_finalize() function is never called, while under Wayland, gdk_wayland_display_finalize() is called after gdk_display_close().