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

Bug #1530277 reported by Alexander E. Patrakov
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Undecided
Unassigned
Xenial
New
Undecided
Unassigned
compiz (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Zesty by Łukasz Zemczak
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

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:

GDK_SCALE=3
GDK_DPI_SCALE=0.33333

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

Revision history for this message
Alexander E. Patrakov (patrakov-gmail) wrote :
Revision history for this message
Alexander E. Patrakov (patrakov-gmail) wrote :

Forgot to say: this is about Compiz 0.9.12.2-10 as compiled on Arch Linux from AUR. See https://aur.archlinux.org/packages/compiz/

Revision history for this message
Alexander E. Patrakov (patrakov-gmail) wrote :
Revision history for this message
Alexander E. Patrakov (patrakov-gmail) wrote :
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

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 0.9.13.0, when it will be available in arch please test again. I am interested if this is still problem with compiz 0.9.13.0 + metacity 3.20.x.

Revision history for this message
Alexander E. Patrakov (patrakov-gmail) wrote :

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.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

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 0.9.13.0 compiz release and then upgrade both.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

compiz 0.9.13.0 is now in arch. :) please test.

Revision history for this message
Alexander E. Patrakov (patrakov-gmail) wrote :

The bug still exists

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

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. :(

Revision history for this message
Alexander E. Patrakov (patrakov-gmail) wrote :

I will check that on Saturday. thanks!

Changed in compiz:
status: New → Fix Committed
Changed in compiz (Ubuntu):
status: New → Fix Released
Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

Ping!
SRU into Xenial.

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Alexander, or anyone else affected,

Accepted compiz into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/compiz/1:0.9.12.3+16.04.20171116-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed 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 https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in compiz (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
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?

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

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

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Tested with:

apt-cache policy compiz
compiz:
  Installed: 1:0.9.12.3+16.04.20171116-0ubuntu1
  Candidate: 1:0.9.12.3+16.04.20171116-0ubuntu1
  Version table:

Works as expected.

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.12.3+16.04.20171116-0ubuntu1

---------------
compiz (1:0.9.12.3+16.04.20171116-0ubuntu1) 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:
    #1702297)

  [ 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) <mail@3v1n0.net> Thu, 16 Nov 2017 23:00:54 +0000

Changed in compiz (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update 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.

Revision history for this message
plum (plumerlis) wrote :

It seems this fix will broke Unity Scaling
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1750273

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

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

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Compiz 0.9.14.0 was released today, which includes this fix.

Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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