Missing mechanism in Glibmm that prevents the support of some themes (CSS) in Gtkmm

Bug #1846699 reported by Alejandro Claro on 2019-10-04
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glibmm2.4 (Ubuntu)

Bug Description

In GTK+ 3.20 the theming mechanics was heavily changed.


One of the major changes was the use of element names much more than style classes. For this the function gtk_widget_class_set_css_name() was added to t he API and used to assign the element names. However, this was not added in GTKmm, making impossible to assign element names in custom widget, and no automatically assignment was developed in GTKmm's Widget class in order to be able to identify widget classes in the theming system (CSS).

The problem was discussed and tracked up to Glibmm in GNOME bug tracking system:


The issues are due to the lack of the mechanism to call gtk_widget_class_set_css_name() function in the instance init function.

This was solved in Glibmm2.4 2.60, however Ubuntu is still behind this version and it's affecting some of our products.

We have applied a patch to the current version (2.56) of Glibmm2.4 in Ubuntu 18.04 successfully, but I would like to ask you to consider upgrading the version of Glibmm in the official repository or apply the patch.

Alejandro Claro (aclaro) on 2019-10-04
description: updated
Alejandro Claro (aclaro) wrote :

Can anybody look at this issue?

We have a patch to solve this in the Ubuntu 18.04 package (version v2.56) and we are also able to compile and use version 2.60. However, we will like to be included in the official distribution files. This simplifies our deployment.

If we provide the patch of the upgrade to v2.6x will anybody review it?

Alejandro Claro (aclaro) wrote :

Patch for version 2.56 that incorporates a fix related to the theme management in version 2.60

The attachment "Patch for version 2.56 that incorporates a fix related to the theme management in version 2.60" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Alejandro Claro (aclaro) wrote :

HI, can someone please sponsor this patch or the upgrade of the Glibmm package to at least version 2.60?

We have some products that are affected by this problem, and we can not upgrade to Ubuntu 20.04 yet.


Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu.

This is a significant bug in Ubuntu. If you need a fix for the bug in previous versions of Ubuntu, please perform as much as possible of the SRU Procedure [1] to bring the need to a developer's attention.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in glibmm2.4 (Ubuntu):
importance: Undecided → Low
status: New → Fix Committed
Alejandro Claro (aclaro) wrote :

Hi @Sebastien,

I don't really understand the last comment. What do you mean by "However, I am closing it because the bug has been fixed in the latest development version of Ubuntu."?

The issue is present in the last version of the package for Ubuntu 18.04 LTS. The problem is that we can NOT migrate our systems to Ubuntu 20.04 LTS.

Sebastien Bacher (seb128) wrote :

The way launchpad bug tracking is working is that the status reflect the current serie, and as you said it's fixed in 20.10. If the fix is needed in older serie it's possible to target an older serie which would add a line to the bug table. We do need to determine if the bug is important enough for a stable update though and a testcase to be able to verify a fix candidate. Could you provide a simple testcase that anyone could follow to confirm the issue and that a package update correct resolve it?

Mathew Hodson (mhodson) on 2020-11-30
tags: added: bionic
Mathew Hodson (mhodson) on 2020-11-30
Changed in glibmm2.4 (Ubuntu Bionic):
importance: Undecided → Low
Changed in glibmm2.4 (Ubuntu):
status: Fix Committed → Fix Released
Sebastien Bacher (seb128) wrote :

Deleting the bionic target for now, it's unclear it's important enough for a SRU yet and it's missing a testcase which could be used to verify an update

no longer affects: glibmm2.4 (Ubuntu Bionic)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.