Discussion:
Using libweston with GTK/GDK
(too old to reply)
adlo
2018-10-29 04:46:02 UTC
Permalink
How do I run a GTK/GDK main loop from inside a libweston compositor? If I want to use functions such as gdk_display_get_default () to get my compositor's GdkDisplay, how do I guarantee that my compositor's display exists?

Regards

adlo
Pekka Paalanen
2018-10-29 09:33:19 UTC
Permalink
On Mon, 29 Oct 2018 04:46:02 +0000
Post by adlo
How do I run a GTK/GDK main loop from inside a libweston compositor?
If I want to use functions such as gdk_display_get_default () to get
my compositor's GdkDisplay, how do I guarantee that my compositor's
display exists?
Hi,

the only opinionated advice I can give you is don't do it. Instead, put
the GTK stuff in a separate process, let your compositor fork & exec
it, and talk to it through your own private protocol extension for the
special bits you need. "Connecting to self" always opens the door for
lots of deadlocks and I don't think those two code bases would nest in
that order well.

Things might be different if your program was GTK app which appeared as
a Wayland server towards other processes.


Thanks,
pq

Continue reading on narkive:
Loading...