window decorations in wayland with gtk3 - alan-mushi/meta-opencpn GitHub Wiki
With the default recipes available in the meta layer, gtk3 doesn't come with window decoration. So the windows using gtk3 looks like these :
This is quite annoying because you need to issue Ctrl
+ c
(in the terminal you launched the application from) to shut it down... But, in the "Known issies" of this page you can see that :
Client side decorations are available in the the master branch but not in 3.8 or older.
So let's take the newest tag from the git and adapt the bitbake recipe from the existing one. Of course i took care to check if this version of gtk supports window decorations in wayland added in this commit. Thanks to the recipes version management, updating to a new version is mainly renaming and remove the patches that can't apply anymore.
This new version of gtk needs a more recent glib-2.0 library (>= 2.37.4). Updating glib-2.0 is as simple as updating gtk. To work in wayland gtk3 needs the variable to be set as GDK_BACKEND=wayland
. Export the variable if it the system doesn't take care of it ($ export GDK_BACKEND=wayland
) an run on of the gtk3 demo applications (gtk3-widget-factory
, gtk3-demo
...).
The result is a wayland that offer gtk3 applications window decorations :
Previous step : Adding appropriate driver
Next step : gpsd support