I’ve spent the last two weekends with the GTK+ Wayland backend, trying to make some progress towards day-to-day usability. While there are still some big gaps, things are looking pretty ok now.
This screenshot shows client-side decorations on a GTK+ window. You can see rounded corners and invisible borders – shadows are still missing. We use the proper resize cursors, depending on which directions the window can be resized. This is a combined work of Kristian and Rob, based on older work by Cody Russell.
The support for settings in GTK+ is a bit complicated: We have a GtkSettings object which receives changes from the xsettings client in the X backend. These xsettings are provided by the xsettings manager that is part of gnome-settings-daemon, which in turns reads the settings out of GSettings.
In Wayland, there is not root window to store properties on, and no X selection mechanism to manage it. In principle, the compositor could provide a settings interface for clients to use. Since we don’t have that yet, the GDK backend reads the settings directly out of GSettings for now. That works fine and fits the Wayland philosophy of doing things client-side.
This screenshot tries to capture some improvements of the keyboard support. Key repeat is done client-side and similar to the settings, we pick up the configuration for it directly from GSettings. Keyboard state information is propagated, and causes the Caps Lock warning icon to be shown in the password entry.
The Wayland backend should also handle keyboard layout changes, but since weston does not support changing layouts at runtime, this has not been tested.
The tooltip on that icon shows that there’s some work left to be done on popup window placement.
Once we have client-side decorations, it becomes very natural to allow custom titlebars, like the one shown in this example. This has always been possible: you could use old-style wm hints to tell the window manager not to put a titlebar, and do your own. Using gtk_window_set_titlebar() just makes this easier, and it does the right thing, regardless whether you are using client-side decorations under Wayland or traditional wm decorations under X.
All of the screenshots are with current git master of GTK+. Trying out Wayland is pretty easy if you are on Fedora 19. The gtk3 package has the Wayland backend enabled. Just install weston, and set GDK_BACKEND=wayland.
To learn more about the status of the GTK+ Wayland backend and the work that remains to be done, visit the wiki page.