Getting GTK XWayland applications to use the system's GTK theme

Bill Spitzak spitzak at gmail.com
Sun Mar 3 08:39:49 PST 2013


On 03/03/2013 12:04 AM, Scott Moreau wrote:
> Hi Rune,
>
I believe he is complaining about the different client-drawn items. 
Compare the "All Settings" button in System Settings to the buttons in 
the "Synaptic Package Manager". It seems that some Ubuntu programs are 
drawing with the correct theme (the System Settings) and some are not.

The fact is the toytoolkit window borders look just fine with the ubuntu 
theme. Chrome is the only program drawing it's own window borders, and 
this is identical to how it works under X, so he is not complaining 
about this.

"How to find the theme" is infuriatingly complex in GTK and Gnome, and I 
think the fact that some environment variables are set different is 
causing the problem. This has nothing to do with xwayland, all the 
relevant code is in the X clients. It looks like some find it, but 
others don't and fall back to the default (the gray one with thicker 3D 
borders). Also Chrome attempts to figure out what the GTK theme is and 
copy it, and it looks like it is also failing to find it.

> On Sat, Mar 2, 2013 at 9:16 PM, Rune Kjær Svendsen <runesvend at gmail.com
> <mailto:runesvend at gmail.com>> wrote:

> In traditional X, the client draws it's content and the window manager
> or other process decorates the windows. It's not much different with
> xwayland. Xwayland clients draw their contents and the window manager
> draws the decorations. In this case, the window manager is a special
> window manager integrated with weston. As it stands currently, weston's
> xwm draws a static decoration for all xwayland surfaces and does not
> support theming.
>
>     I run Ubuntu 12.10, and everything just works wrt. GTK themes here
>     (with Unity and compiz). But when I run weston (whether it be using
>     the DRM or X backend) and launch GTK clients, most of them load a
>     different theme than Ubuntu's default one (Ambiance).
>
>     Here's a screenshot showcasing different applications running as
>     XWayland clients with the DRM backend: http://i.imgur.com/lvUbYIb.png



More information about the wayland-devel mailing list