GNOME Bugzilla – Bug 729781
Shadow included in CSD window
Last modified: 2018-03-30 11:39:06 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.
Created attachment 276130 [details] KSnapshot snapped to the shadow of gtk3-demo
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.
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 ?
(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.
(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 ;-)
@Giovanni Perfect, I'll update my patch linked to check for that.
(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
(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.
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.
Check added back