After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778209 - Clearlooks family themes have distorted window buttons
Clearlooks family themes have distorted window buttons
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: themes
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2017-02-05 16:07 UTC by yefexe7584
Modified: 2017-02-05 22:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A zip containing images showing the difference between the Marco and Metacity handling of Clearlooks (4.87 KB, application/zip)
2017-02-05 16:07 UTC, yefexe7584
  Details
Marco Clearlooks (2.46 KB, image/png)
2017-02-05 16:49 UTC, yefexe7584
  Details
Metacity Clearlooks (2.06 KB, image/png)
2017-02-05 16:49 UTC, yefexe7584
  Details
Metacity 3.22.1, TraditionalOk (5.53 KB, image/png)
2017-02-05 17:15 UTC, Alberts Muktupāvels
  Details
libmetacity: use POS_EXPR_INT for POS_TOKEN_VARIABLE (2.77 KB, patch)
2017-02-05 20:19 UTC, Alberts Muktupāvels
committed Details | Review

Description yefexe7584 2017-02-05 16:07:23 UTC
Created attachment 344981 [details]
A zip containing images showing the difference between the Marco and Metacity handling of Clearlooks

Apologies if this has already been reported. I've noticed that Metacity has trouble displaying the window buttons for Clearlooks family themes (Clearlooks, ClearlooksRe, TraditionalOk, Inverted etc). 

The X for the close button, the square for maximise and the line for minimise appear squashed and fuzzy. I've attached screenshots to illustrate what I mean.

I've filed this against Metacity 3.22 but I think it has been an issue for some time, perhaps since 3.16 though I'm afraid I'm not too sure. Unfortunately, I didn't get round to filing a bug report at the time. 

This is not an issue with any version of Marco, and that includes the GTK+ 3 version of Marco 1.16 so I don't think it's a GTK+ 3 issue per se. However, exactly the same issue occurs with the GTK Window Decorator in Compiz 0.9.x.

I'm using Arch Linux with Intel Graphics.
Comment 1 Alberts Muktupāvels 2017-02-05 16:46:09 UTC
I can not download attachment... :(
Comment 2 yefexe7584 2017-02-05 16:49:24 UTC
Created attachment 344985 [details]
Marco Clearlooks
Comment 3 yefexe7584 2017-02-05 16:49:49 UTC
Created attachment 344986 [details]
Metacity Clearlooks
Comment 4 yefexe7584 2017-02-05 16:50:20 UTC
I've uploaded the images individually. Do they download ok?
Comment 5 Alberts Muktupāvels 2017-02-05 16:52:33 UTC
It looks like problem was/is with firefox. I was able to download attachment from google chrome. :)
Comment 6 Alberts Muktupāvels 2017-02-05 16:57:07 UTC
What theme is used in screenshots? Metacity theme name and also GTK+ theme?
Comment 7 Alberts Muktupāvels 2017-02-05 17:01:05 UTC
What version of metacity is used? And where to download metacity theme?
Comment 8 yefexe7584 2017-02-05 17:01:34 UTC
That's the TraditionalOk Metacity theme and GTK+ theme in the screenshot.
Comment 9 yefexe7584 2017-02-05 17:02:37 UTC
Theme is available here: https://github.com/mate-desktop/mate-themes/tree/master/desktop-themes/TraditionalOk
Comment 10 yefexe7584 2017-02-05 17:05:00 UTC
Oh and that's Metacity 3.22.1.
Comment 11 Alberts Muktupāvels 2017-02-05 17:15:14 UTC
- Downloaded themes from that link.
- Changed gtk+ and metacity theme to TraditionalOk

I will attach image with what I see. Do you use that theme from git master or older version?
Comment 12 Alberts Muktupāvels 2017-02-05 17:15:55 UTC
Created attachment 344987 [details]
Metacity 3.22.1, TraditionalOk
Comment 13 yefexe7584 2017-02-05 17:21:48 UTC
I'm using the very latest version of the theme from Master. 

I just figured what the difference might be. Try setting org.gnome.desktop.wm.preferences titlebar-font to Sans Bold 10
and make sure org.gnome.desktop.wm.preferences titlebar-uses-system-font is false.
Comment 14 yefexe7584 2017-02-05 17:22:38 UTC
Sorry! It didn't occur to me until just now that the font size might be a factor.
Comment 15 Alberts Muktupāvels 2017-02-05 17:25:48 UTC
Yes, changing font I see similar "effect". Did you use same font with marco?
Comment 16 yefexe7584 2017-02-05 17:27:13 UTC
Yes. I used exactly the same font with Marco.
Comment 17 yefexe7584 2017-02-05 17:32:52 UTC
With regards to the font size in Marco, I tried setting it to lower and lower sizes, going down to size 2. The button images didn't get distorted in the same way they did in Metacity.
Comment 18 Alberts Muktupāvels 2017-02-05 17:34:43 UTC
Does titlebar height are same?
Comment 19 yefexe7584 2017-02-05 17:37:15 UTC
As near as I can tell, the titlebar heights are exactly the same.
Comment 20 Alberts Muktupāvels 2017-02-05 20:19:58 UTC
Created attachment 344994 [details] [review]
libmetacity: use POS_EXPR_INT for POS_TOKEN_VARIABLE

Can you test this patch?
Comment 21 yefexe7584 2017-02-05 20:37:29 UTC
Building now.
Comment 22 yefexe7584 2017-02-05 20:43:00 UTC
I get the following build failure:

meta-draw-op.c: In function ‘fill_env’:
meta-draw-op.c:77:20: error: ‘MetaDrawInfo {aka const struct _MetaDrawInfo}’ has no member named ‘scale’
   env->scale = info->scale;
Comment 23 Alberts Muktupāvels 2017-02-05 20:43:59 UTC
Can you test with master then?
Comment 24 Alberts Muktupāvels 2017-02-05 20:45:28 UTC
Or cherry-pick c54fa264dbbf4cf4df45e049778a95bc609f49b8
Comment 25 Alberts Muktupāvels 2017-02-05 20:49:13 UTC
P.S. if you use irc then there is #gnome-flashback in irc.gnome.org...
Comment 26 yefexe7584 2017-02-05 20:55:15 UTC
Thanks. I couldn't get configure to run from master.

./configure: line 2574: syntax error near unexpected token `git-directory'
./configure: line 2574: `AX_IS_RELEASE(git-directory)'

I'll try cherrypicking.
Comment 27 Alberts Muktupāvels 2017-02-05 21:13:34 UTC
To build master you need autoconf-archive.
Comment 28 yefexe7584 2017-02-05 21:27:28 UTC
Sorry it took me so long! I didn't know about autoconf-archive. Unfortunately, the patch doesn't seem to work for me. I still see the same behaviour with the patched version. I'll try building it again. Thanks for looking into this so quickly by the way.
Comment 29 Alberts Muktupāvels 2017-02-05 21:31:30 UTC
Are you sure?

Patch did work for me with master and I also just tested with 3.22.
Comment 30 yefexe7584 2017-02-05 21:38:08 UTC
I'm an idiot... The build system was overwriting master with the plain old 3.22 source and then building that. I thought I'd told it not to but I hadn't. I've just built master with the patch and it works! Thanks so much for solving this and sorry again about the delays!
Comment 31 Alberts Muktupāvels 2017-02-05 21:39:50 UTC
Did you try other themes and/or settings? I am interested if there is no extra/new regressions.
Comment 32 yefexe7584 2017-02-05 21:41:31 UTC
I didn't but I will have a look now.
Comment 33 yefexe7584 2017-02-05 21:56:57 UTC
All themes I have display fine with the patched version. The fonts can be shrunk still further and the window buttons will no longer deform so it behaves just like Marco now in the respect. Increasing the font size is also fine. I can't spot any regressions.