gtk-window-decorator incorrectly draws the title bar if GDK_SCALE is set

Bug #1530277 reported by Alexander E. Patrakov on 2015-12-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Declined for Zesty by Łukasz Zemczak

Bug Description


I have a HiDPI screen. For all other GTK3 applications (and, to some extent, GTK2) to deal with it, I have to set two variables:


The font rendering DPI is set to 240.

Unfortunately, this breaks decorations drawn by gtk-window-decorator, as illustrated on the screenshot. I can work around this by creating a wrapper that sets these variables to 1, only for this broken decorator.

[Test case]

1) In mate or pure compiz session run:
   env GDK_SCALE=3 GDK_DPI_SCALE=0.33333 gtk-window-decoration --replace
2) Check the decorations appearance
3) They should look properly scaled without glitches

[Regression potential]
The scaling is wrong or the decorations aren't properly painted

Related branches

Forgot to say: this is about Compiz as compiled on Arch Linux from AUR. See

I guess this is still bug/problem, right? Can you tell Metacity version that is used with compiz?

Metacity had HiDPI changes/fixes... Soon there will be new compiz release, when it will be available in arch please test again. I am interested if this is still problem with compiz + metacity 3.20.x.

There is no Metacity running, but version 3.18.4-1 is installed. I use MATE desktop on Arch Linux.

I will upgrade Metacity later today to version 3.20.1-1 and retest the bug.

You don't need it to be running, library from metacity is used to draw themes. :)

Do not upgrade yet, current compiz version will not work with metacity 3.20, wait for compiz release and then upgrade both.

compiz is now in arch. :) please test.

The bug still exists

If you know how to rebuild compiz then check linked merge proposal. That will fix decorations, but it is not full fix... I have no time to work on it. :(

I will check that on Saturday. thanks!

Changed in compiz:
status: New → Fix Committed
Changed in compiz (Ubuntu):
status: New → Fix Released
Amr Ibrahim (amribrahim1987) wrote :

SRU into Xenial.

description: updated

Hello Alexander, or anyone else affected,

Accepted compiz into xenial-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in compiz (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
Ads20000 (ads20000) wrote :

Is the bug reproducible with non-HiDPI screens? And how do I change the environment variable back to the default once I've reproduced this bug, reboot?

Yes, this bug is reproducible also on non-HiDPI. Start GNOME Flashback session or any other that would use compiz + gtk-window-decorator. Then use terminal to restart gtk-window-decorator:

- GDK_SCALE=2 gtk-window-decorator --replace &
This will show broken decorations if using version without fix, otherwise you should not see any difference.

After testing just do:
- gtk-window-decorator --replace &
- exit

Tested with:

apt-cache policy compiz
  Installed: 1:
  Candidate: 1:
  Version table:

Works as expected.

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:

compiz (1: xenial; urgency=medium

  [ Eleni Maria Stea ]
  * Added option to disable blend in grid plugin (LP: #1700859)
  * Move: add options for showing only the window shape (filled or not)
    (LP: #1700859)

  [ Alberts Muktupāvels ]
  * Ensure that surfaces used by metacity theme have device scale set to
    1 . (LP: #1530277) (LP: #1530277)
  * Use AnyPropertyType when getting _MOTIF_WM_HINTS property. (LP:

  [ Martin Wimpress ]
  * mate: Avoid artefacts of Windows Thumbnail Previews (LP: #1606369)

  [ Marco Trevisan (Treviño) ]
  * move: damage all the border area in outline mode and ignore
    transparent colors (LP: #1700859)
  * grid: ignore alpha in colors when not blending, and fix animations
    (LP: #1700859)
  * resize: add support for disabling transparency and avoid over-
    damaging in outline mode (LP: #1700859)
  * Screen: add averageColor to get the current desktop average color
  * unity-lowgfx.ini: remove unsupported unity option

 -- Marco Trevisan (Treviño) <> Thu, 16 Nov 2017 23:00:54 +0000

Changed in compiz (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for compiz has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

plum (plumerlis) wrote :

It seems this fix will broke Unity Scaling

plum, unity does not use gtk-window-decorator... so problem is elsewhere.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers