This Month in Mutter & GNOME Shell | May and June 2020

The volunteers and contributors working on Mutter and GNOME Shell have been busy in the past couple of months — so much so that we didn’t have bandwidth to write the May development report!

As a consequence, this development summary will have an above average number of changes to highlight.


Preparations for Customizable App Grid

As part of the preparations for a customizable application grid, anew layout manager was written and replaced the current icon grid code. This new layout manager is in many ways more suitable for current and future changes:

  • It follows the delegation pattern that is common to Clutter. As such, it is a layout manager, and not an UI element itself.
  • It allows more precise control over the how the grid is displayed.
  • It uses modern JavaScript practices and is, in general, a more maintainable and comprehensive code.

The most visible impact is that it now selects a row x column configuration that is closest to the aspect ratio of the display:

New layout manager on portrait mode

There are still improvements to make, especially with ultra-wide displays, but the foundation work is already there, and it will be vastly easier to fine-tune the behavior of the app grid on different scenarios.

Also as part of the preparations for a customizable application grid, the Frequent tab was removed . You can read more about the reasons for this removal in thecorresponding issue.

Actor Tree Inspector

GNOME Shell’s development tool, the Looking Glass, received a handy new tab to inspect the actor tree :

The new actor tree tab in the Looking Glass

This new inspector has been useful for developing GNOME Shell, and hopefully it’ll help extension developers too.

App Folder Dialog Updates

App folder dialogs received a bunch of visual and behavioral improvements, such as covering the entire monitor, and not changing the size of the app grid itself. Take a look:

These dialogs are now paginated, and fixed to 9 app icons per page:

Paginated folder dialogs with 9 items

Like the app grid, folder dialogs now also have better support for touchpad gestures and Drag n’ Drop.

Updates to the Message List Popup

This year, GNOME Shell has a Google Summer of Code intern working on the messages dialog. As a preparation for this project, some cleanups and reorganizations of the message list popup landed . More work in this front is happening, and an influx of improvements is expected to come soon, stay tuned!

Other Changes

GNOME Shell now supports the PrefersNonDefaultGPU key of the Desktop File specification , and will set the appropriate environment variables to launch applications using a dedicated GPU when available.

An unfortunate oversight was causing the Do Not Disturb setting to be reset on startup.This bug was fixed. A potential D-Bus race condition when creating MPRIS media playerswas corrected. App icons do not vertically stretch in the top baranymore. These bugfixes were backported to GNOME 3.36.

The rendered contents of labels are nowcached in the GPU.

The code that deals with workspaces in GNOME Shell is old, but a large number of cleanups to it has landed (!1119, !1251 , !1294 , !1297 , !1298 , !1307 , !1310 , !1313 , !1320 ,!1333), and even more is under review. These cleanups were much needed in order to improve the overall quality and maintainability of the codebase.

The Extensions app saw some improvements too. The Logout button nowworks correctly .

When the host system changes timezones, GNOME Shell nowproperly updates the timezone offsets of the “World Clocks” section of the messages popover.

Finally, the Wacom buttom mapping on-screen display received various quality-of-life improvements .


Layout Machinery Optimizations

A few exciting optimizations and improvements to Clutter’s layout machinery landed, and they bring groundwork for future improvements as well.

The removal of allocation flags allowed skipping the allocation phase of actors whose absolute position (that is, the on-screen position after performing the linear transformation of the actor vertices) didn’t change.

While routinely profiling Mutter, it was noticed that an abnormally high number of safety type checks were happening in a rendering hot path, during the redraw cycle. Those checks were removed .

Combined, these changes are of notable significance due to how expensive it is to recalculate the layout of actors. Some of them are also required for per-CRTC frame clocks.

Rendering Pipeline Improvements

Cogl now supports setting a maximum mipmap level, in addition to the minimum one, and background set a maximum mipmap level . This avoids creating mipmaps  that won’t be used.

Last year, MetaShapedTexture was made into a ClutterContent implementation . This change was important for a multitude of reasons, and will play a special role in the future with upcoming cleanups. However, it also introduced an unforeseen regression: Clutter paints ClutterContents before running the main painting routines, and this broke the existing culling mechanism of Mutter. After some investigation, cullingwas fixed again .

At last, MetaShapedTexture now uses a lighter, more appropriate function to combine opaque areas of windows .

Other Changes

Mutter saw avery, very , very , very large number of code cleanups. In fact, these cleanups combined got rid of almost the entirety of deprecated code!

Mutter also received aseries of improvements to its test suit. These improvements range from fixing broken tests, make CI more reliable, add more tests, reorganize the entire suite, among other changes.

Damage tracking, especially when combined with shadow framebuffers, are now working reliably and correctly . Importing DMA buffers is more careful about failures when importing scanout buffers . Finally, a couple of small memory leakswere plugged .