Progress Report July 31st - August 13th

Some may notice that there's a week missing since my last progress report. That week was GSoC second evaluation week, and my mentors were notified in advance why I was absent during that week.

Since last time I posted, I have completed my primary goal to make mutter start without Xwayland present. Note however, that this is just like I said, "make mutter *start* without X11 present", and nothing else. Window managing is a bit mess, and that was set as my second goal, if the primary one was accomplished much earlier in the SoC. So yes, you can start but you can't use mutter without X11 if you use my latest work.

So, what remained to be done since the last time I posted? Not much. Workspace management had lot of X11 specifics, such as getting workspace layout, names and such from X11 atoms. It was easily fixed by splitting X11 specific code to meta-x11-display.c and making that code run when or after MetaX11Display was created, either in meta_x11_display_new (), or using special signal handlers which notify that something workspace related was changed. Similar work was done about StackTracker, which at startup synchronized stack with X server. 

Last piece of code was related to GTK, or specifically, GDK usage. Previously, GTK was initialized early in the code, even before MetaDisplay was created. As such, it was possible to use GtkSettings to retrieve some settings and manage them via MetaPreferences. This was also used to get primary screen and X display for MetaX11Display creation. After my changes, GDK initialization was moved early into MetaX11Display initialization, and GdkDisplay is now properly tracked, which makes creating and destroying MetaX11Display several times a bit easier, as well retrieving default screen and xdisplay.

But this comes at a cost - one cannot use GtkSettings anymore in the place it was used, and gtk-shell-shows-app-menu GTK setting is no longer honored. One has to use meta_prefs_set_show_fallback_app_menu () function which was added right before usage of GTK setting was dropped. Also, some X11 specific code that was ran when mutter was started with --nested on X11 used GDK code, while GDK is not initialized when --no-x11 was passed. This was easy to fix, falling back to using pure X11 calls, rather than GDK wrappers.

This sums up the work that was required to get mutter to start without X11. But that was not all. As feedback on previous work on my patches, I was suggested to split workspace management code into separate file and object - MetaWorkspaceManager. This was simply copy/paste/rename effort, but the final patch was larger than all of the patches above! And finally, some legacy screen size tracking, which was moved from MetaScreen to MetaDisplay is now replaced with fairly new MetaMonitorManager, with only one wrapper function remaining in place!

Sounds good, how do I try it?

The code is hosted at github, gsoc-v4 branch. It can be obtained and installed using

$ git clone -b gsoc-v4
$ cd mutter
$ ./ --prefix=$HOME/mutter-gsoc
$ make && make install
$ ln -s /usr/bin/Xwayland $HOME/mutter-gsoc/bin
$ export XDG_DATA_DIRS=$HOME/mutter-gsoc/share:/usr/share

It can be tested by either running the following from a terminal emulator

$ $HOME/mutter-gsoc/bin/mutter --nested --wayland --no-x11

Or the following from a VT

$ $HOME/mutter-gsoc/bin/mutter --display-server --wayland --no-x11

That's it. Don't expect much from it, except that it will start without spawning Xwayland and not crash!

In case you missed it, I've written a blog post last week which outlines all the API changes that happened during SoC, and can be found at


Popular posts from this blog

The GSoC wrap-up

Documented Mutter API changes after main GSoC goal was reached