GTK+

As a Funtoo user, and as a MATE user, I had to deal with a problem with GTK+3-based apps when I have windows composition enabled, because popup windows are not drawn correctly. The reason? CSD.

Client-Side Decorations is the new feature brought by GTK+3 since 3.12, that includes its own windows composition. The problem? It cannot be disabled by default, unless you can do some tricks. The CSS tweak doesn't work as well as we wish.

While surfing through the Internet, I found that package in the AUR repository (from Arch Linux), from which I took 2 files that are useful for me.

Luckily, the GTK 3.0 ebuild for Gentoo (and based ones) contains the epatch_user instruction, so we can just put our own patches, and let Emerge do the rest of the part.

Note: If you use any other Linux distro, you can do this too, but must patch manually, and re-compile the package from the source. Ask for the way to do for you distro.

First, download this patch, and put it inside:

/etc/portage/patches/x11-libs/gtk+:3/

Create those directories if not existing.

Then, recompile the GTK +3 package:

emerge -1 gtk+:3

Don't worry, the patch is applied itself. Just wait.

Meanwhile, add the right environment variable. You have 2 ways:

  1. As a system variable, download this file, and put it inside /etc/profile.d/. Also, if needed, add execution permissions.
  2. As an user variable. open the .profile or .xprofile file (create it if not available), and add the following line: export GTK_DISABLE_CSD=1

For any of those, restart the session after GTK+ 3 compiled successfully.

Then, just try open any GTK+ 3 app (i.e. Transmission Torrent Client, Evolution, etc.). I tried with my Funtoo installation, using MATE and window composition enabled.

As it seems, CSD is a very bad idea.

Jorgicio

P.S. This tutorial is also available in the Funtoo Forums.

Related content