gdkselectioninputstream-x11: Explicitly handle stream ownership in signal
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 30 May 2023 15:59:06 +0000 (17:59 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 5 Jun 2023 12:01:55 +0000 (08:01 -0400)
commit7513fd5d6440a87c290f61455a2c355ed200073a
treea2b44c7e56f825779f14df9269fc884e2027ee00
parent6c9a1c51ba0ee29e05a3a05c3450e273f955af79
gdkselectioninputstream-x11: Explicitly handle stream ownership in signal

The display xevent signal connection takes the ownership of the stream
until we get a valid event, so it should manage the stream lifetime.

So make this clearer, by automatically removing the stream reference
when we disconnect from the xevent signal handler.
gdk/x11/gdkselectioninputstream-x11.c