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 757101 - server-side window decorations are square
server-side window decorations are square
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Themes
3.18.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-10-25 17:53 UTC by Mantas Mikulėnas (grawity)
Modified: 2015-10-27 08:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
theme: Set object-name on style contexts (3.08 KB, patch)
2015-10-27 08:43 UTC, Florian Müllner
committed Details | Review

Description Mantas Mikulėnas (grawity) 2015-10-25 17:53:27 UTC
Somewhere between commits 027b02a and 57057f7, mutter-drawn window decorations lost their round corners. (I'm guessing in 371f501?)
Comment 1 Matthias Clasen 2015-10-25 19:06:33 UTC
Florian, can you take a look ? I'm not sure whats missing here, and don't have a mutter thats linkeds against gtk master atm.
Comment 2 Florian Müllner 2015-10-25 19:54:03 UTC
(In reply to Mantas Mikulėnas from comment #0)
> (I'm guessing in 371f501?)

That guess is correct. The commit replaced the ".window-frame" class with the "decoration" CSS node name in the theme. As CSS nodes are internal to GTK+, this isn't something we can currently fix in mutter - we either need API to set the node name on a style context (without going through GtkWidget), or revert the theme changes in that commit.
Comment 3 Matthias Clasen 2015-10-26 02:02:08 UTC
But .window-frame was just as internal to gtk+. How is mutter depending on this implementation detail of GtkWindow ?
Comment 4 Florian Müllner 2015-10-26 03:43:21 UTC
Because it's the API GTK+ gives us for drawing server-side decorations the same way GTK+ draws client-side decorations without being a GTK+ application. We build a hierarchy of GtkStyleContexts that matches the hierarchy in a GtkWindow with a headerbar and buttons, then use the gtk_render_* functions for drawing.

The only alternatives to that approach as far as I can see are:
 * go back to use a separate window manager theme and try to keep
   it in sync with GTK+ (the pre-3.16 situation, which sucked)
 * add public API to GTK+ that allows us to stop relying on implementation
   details, but that's likely to be useless to anyone but mutter

Neither of those sound very compelling to me ...
Comment 5 Lapo Calamandrei 2015-10-26 12:04:46 UTC
Please, don't give me back a window manager theme.
Comment 6 Matthias Clasen 2015-10-27 01:15:17 UTC
We've added gtk_widget_path_iter_set_object_name which should let mutter do what it needs to do.
Comment 7 Florian Müllner 2015-10-27 08:42:57 UTC
The following fix has been pushed:
2750db2 theme: Set object-name on style contexts
Comment 8 Florian Müllner 2015-10-27 08:43:04 UTC
Created attachment 314196 [details] [review]
theme: Set object-name on style contexts

The default theme started to use them in GTK+ commit 371f50, so
we need to update the style contexts to keep matching the style
of client-side decorations.