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 729781 - Shadow included in CSD window
Shadow included in CSD window
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: CSD
 
 
Reported: 2014-05-08 06:32 UTC by Martin Gräßlin
Modified: 2018-03-30 11:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A quick tiled window (observe shadow between screen edge and window) (65.10 KB, image/png)
2014-05-08 06:32 UTC, Martin Gräßlin
Details
KSnapshot snapped to the shadow of gtk3-demo (492.72 KB, image/png)
2014-05-08 06:33 UTC, Martin Gräßlin
Details

Description Martin Gräßlin 2014-05-08 06:32:19 UTC
Created attachment 276129 [details]
A quick tiled window (observe shadow between screen edge and window)

With Gtk 3.12.1 the shadow is included in the window. This results in miscalculations as window managers cannot know that there is a shadow. E.g. with KWin at least the following features are broken:

* snapping between windows during moving (snaps to shadow)
* snapping against screen borders and panels
* Quick tiling on screen edges
* positioning in Present Windows grid (should ignore shadows like it's done for windows with KWin shadow in decoration)
* taskbar thumbnails in plasmashell (upcoming release) which does not include shadows

Please see attached screenshots of broken quick tiling and snapping

Note: this affects our stable release 4.11 which got releases in July 2013 and is not open for any adjustments.
Comment 1 Martin Gräßlin 2014-05-08 06:33:34 UTC
Created attachment 276130 [details]
KSnapshot snapped to the shadow of gtk3-demo
Comment 2 Giovanni Campagna 2014-05-08 15:16:37 UTC
The window manager can know the extent of the shadow (as well as the invisible border) looking at the _GTK_FRAME_EXTENTS window property - this is how mutter copes with CSD, and should allow proper snapping and tiling.
Comment 3 David Edmundson 2014-05-08 15:43:50 UTC
Awesome. Maybe we can standardise this in future?

Till then, we need to not have apps relying on WMs knowing about this hint.
We can't rely on everyone implementing proprietary extensions and certainly can't expect everyone to update all code whenever GTK makes a release.

Perhaps we can put _SUPPORTS_GTK_FRAME_EXTENTS hint on the relevant window manager's root window and we can check for that on in https://bugzilla.gnome.org/show_bug.cgi?id=729721 ?
Comment 4 Giovanni Campagna 2014-05-08 15:53:01 UTC
(In reply to comment #3)
> 
> Perhaps we can put _SUPPORTS_GTK_FRAME_EXTENTS hint on the relevant window
> manager's root window and we can check for that on in
> https://bugzilla.gnome.org/show_bug.cgi?id=729721 ?

This is already the case, mutter adds _GTK_FRAME_EXTENTS in _NET_SUPPORTED.
Comment 5 Martin Gräßlin 2014-05-08 16:03:07 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > 
> > Perhaps we can put _SUPPORTS_GTK_FRAME_EXTENTS hint on the relevant window
> > manager's root window and we can check for that on in
> > https://bugzilla.gnome.org/show_bug.cgi?id=729721 ?
> 
> This is already the case, mutter adds _GTK_FRAME_EXTENTS in _NET_SUPPORTED.

then it would be good if GTK checks for that and doesn't add shadows if that's not added. I'm quite sure that KWin doesn't add that to _NET_SUPPORTED ;-)
Comment 6 David Edmundson 2014-05-08 16:06:58 UTC
@Giovanni
Perfect, I'll update my patch linked to check for that.
Comment 7 Jasper St. Pierre (not reading bugmail) 2014-06-25 14:18:33 UTC
(In reply to comment #3)
> Awesome. Maybe we can standardise this in future?

I sent out a mail to wm-spec-list almost a year ago and got *zero* feedback, so you can't fault me for trying.

https://mail.gnome.org/archives/wm-spec-list/2013-August/msg00000.html
Comment 8 Jasper St. Pierre (not reading bugmail) 2014-06-25 14:19:05 UTC
(In reply to comment #5)
> then it would be good if GTK checks for that and doesn't add shadows if that's
> not added. I'm quite sure that KWin doesn't add that to _NET_SUPPORTED ;-)

This was the case at some point, but it was removed for some reason. I'll try to dig up why.
Comment 9 Matthias Clasen 2015-03-10 01:46:34 UTC
I'm considering adding the check for _GTK_FRAME_EXTENTS back in for 3.16.

In a recent test, I found both xfce and mate support it now, and thus adding the check back will not affect gnome, mate or xfce, and it will fix the shadow problem for kde.
Comment 10 Matthias Clasen 2015-03-10 01:54:03 UTC
Check added back