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 734984 - CSD windows have incorrectly sized shadows
CSD windows have incorrectly sized shadows
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Quartz
3.13.x
Other Mac OS
: Normal major
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-08-18 08:28 UTC by Patrick Griffis (tingping)
Modified: 2015-07-28 10:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (404.58 KB, image/png)
2014-08-18 08:28 UTC, Patrick Griffis (tingping)
  Details
Quartz: Turn off csd (865 bytes, patch)
2015-03-10 13:53 UTC, Matthias Clasen
none Details | Review
without-csd (103.79 KB, image/png)
2015-03-10 19:40 UTC, Patrick Griffis (tingping)
  Details
Quartz: Respect GDK_DECOR_BORDER (1.02 KB, patch)
2015-03-10 21:13 UTC, Matthias Clasen
none Details | Review
quartz: disable system shadows if a GdkWindow shadow is set. (3.03 KB, patch)
2015-07-19 18:26 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Patrick Griffis (tingping) 2014-08-18 08:28:10 UTC
Created attachment 283717 [details]
screenshot

Attached is a screenshot of what I mean.

This is 3.13.6 running on 10.10. All CSD windows have it including menu popups. You also cannot move that shadow above the top system menu.
Comment 1 Matthias Clasen 2014-08-21 12:55:39 UTC
this looks like the system is putting a shadow around the invisible border we use for resizing.
Comment 2 Emmanuele Bassi (:ebassi) 2014-08-21 13:21:43 UTC
we should not have invisible borders or shadows on Quartz: the system will do both for us in a consistent way.
Comment 3 Patrick Griffis (tingping) 2014-08-21 14:02:05 UTC
The correct shadow around the window seems to be the NSView's native shadow.
Comment 4 Christoph Reiter (lazka) 2014-10-09 06:56:36 UTC
I use this CSS as a workaround for 3.14 on 10.9:

GtkWindow {
    box-shadow: none;
}
.tooltip {
    border-radius: 0;
    padding: 0;
}
.tooltip.background {
    background-clip: border-box;
}
Comment 5 Matthias Clasen 2015-03-10 13:53:04 UTC
Created attachment 298995 [details] [review]
Quartz: Turn off csd
Comment 6 Matthias Clasen 2015-03-10 13:53:26 UTC
does this patch have the desired effect ?
Comment 7 Patrick Griffis (tingping) 2015-03-10 19:40:05 UTC
Created attachment 299049 [details]
without-csd

>  if (GDK_IS_QUARTZ_DISPLAY (gtk_widget_get_display (widget))

Missing a ')'.


>does this patch have the desired effect ?

Well as you can see from the attachment it does avoid the issue, but I am not sure entirely disabling CSD is the ideal solution. Perhaps for now it is the best solution if nobody is going to improve the existing CSD support.
Comment 8 Matthias Clasen 2015-03-10 21:13:18 UTC
Created attachment 299054 [details] [review]
Quartz: Respect GDK_DECOR_BORDER

This will make it easier to make csd windows work well on OS X.
Comment 9 Matthias Clasen 2015-03-10 21:13:44 UTC
Does this patch make things better ?
Comment 10 Patrick Griffis (tingping) 2015-03-10 21:48:59 UTC
(In reply to Matthias Clasen from comment #9)
> Does this patch make things better ?

Hmm, Upon testing master the shadow around the main CSD window is actually already fixed.
Though the other issues remain, shadow around popups, CSD window sizing, etc.

Your patch does not seem to change any visible behavior.
Comment 11 Christoph Reiter (lazka) 2015-07-19 18:26:17 UTC
Created attachment 307695 [details] [review]
quartz: disable system shadows if a GdkWindow shadow is set.

this should fix the popup/menu/tooltip problems
Comment 12 Matthias Clasen 2015-07-26 14:34:29 UTC
Ting Ping, can you confirm that that this works for you as well ?
Comment 13 Patrick Griffis (tingping) 2015-07-27 04:50:22 UTC
(In reply to Matthias Clasen from comment #12)
> Ting Ping, can you confirm that that this works for you as well ?

Yes patch seems to work fine, though very recently you broke the quartz backend in 6d04183c and 6ac07a2e.
Here is my patch to fix those, don't know if you want a full issue over it: http://fpaste.org/248385/97244914/
Comment 14 Matthias Clasen 2015-07-27 13:24:08 UTC
oh, can you push that fix, please ?
Comment 15 Matthias Clasen 2015-07-27 13:33:43 UTC
Review of attachment 307695 [details] [review]:

confirmed working, so please push
Comment 16 Matthias Clasen 2015-07-28 10:41:32 UTC
I guess this can be closed now