I’ve been working on making GtkInspector use a different display connection. This helps isolating it from some of the changes you can trigger from inside the inspector UI. Then I thought, why not use a different backend ?!
We did enough work on GDK backend separation that it could almost work. But since we didn’t add API to actually connect to specific backends (users and applications get some control with GDK_BACKEND and gdk_set_allowed_backends()), nobody has ever used multiple backends in the same process. And things that don’t get used don’t work. So some fixes were necessary.
But now I have gtk3-demo running under X while the inspector is using the Broadway backend and shows up in the web browser:
To my knowledge this is the first time a GTK+ application is using multiple GDK backends at the same time.
Anticipating some questions:
- What is this good for ?
Not that much, really. I consider it mostly a curiosity. It does prove that the GDK backend separation is (almost) working.
For most cases where this could be used with the inspector, it is probably preferable to move the inspector out of process and communicate via D-Bus. There are some people who are interested in this, so it may happen.
- Can I use this in my application ?
No. I haven’t committed that hack that makes the inspector use a different backend . If we wanted to support this, we would need to add a real API to connect to a specific backend.
What I did commit though is the code that makes the inspector always use a separate display connection (with the same backend), so you get the better isolation that can be seen in the video.
- Does this also work with Wayland ?
No. I first tried to make it work with Wayland+X, but the Wayland backend is more complicated than Broadway. I’m still getting crashes fairly soon. Broadway pretty much just worked, after a round of fixes.
Hello , I want to change the height of head bar because it is really big for me. I can change the height of title bar by modify /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml and found that 12px is just suitable. But I I really don’t know how to change the height of head bar and tab bar under gnome 3.14. Your solution in the article “TWEAKING A THE GTK+ THEME, USING CSS” does not effect in gnome 3.14. Can you help me ? Thanks very much.
Does this work now allows Gtk+ applications to cleanly disconnect from a display?
There’s this very long standing bug about that:
http://bugzilla.gnome.org/show_bug.cgi?id=85715