Potential fix for M1 x-thread events

On M1, the cross-thread channel sets G_IO_PRI in addition to G_IO_IN
this breaks various assumptions in receivers, which test for ~G_IO_IN
as error condition.
This commit is contained in:
Robin Gareus 2022-05-02 00:02:33 +02:00
parent dfaf790e7d
commit f7e917c123
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -61,7 +61,7 @@ CrossThreadChannel::set_receive_handler (sigc::slot<bool,Glib::IOCondition> s)
void
CrossThreadChannel::attach (Glib::RefPtr<Glib::MainContext> context)
{
receive_source = g_io_create_watch (receive_channel, GIOCondition(G_IO_IN|G_IO_PRI|G_IO_ERR|G_IO_HUP|G_IO_NVAL));
receive_source = g_io_create_watch (receive_channel, GIOCondition(G_IO_IN | G_IO_ERR | G_IO_HUP));
g_source_set_callback (receive_source, G_SOURCE_FUNC(cross_thread_channel_call_receive_slot), this, NULL);
g_source_attach (receive_source, context->gobj());