Skip to content

[macos] Use FullSizeContent for CSD

Paul Rouget requested to merge paulrouget/gtk:contentview-step1 into main

For CSD, on macos, the original method was to make the window fully transparent, and draw shadows client side, and add a global padding to center the content. The window endup being virtually (not visually) bigger than what it is (see attached screenshort, with the real window being visiable), creating resizing issues and looking "weird" in exposé mode.

MacOS has a proper solution to do client size decorations: https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644646-fullsizecontentview

This is what I'm using in this PR.

Note: It's possible this will not work in earlier macos versions.

This PR can't be merged as it is, you'll notice that I had to skip the solid-csd class. In the CSS, this class, I think, adds drop shadows and a not-needed anymore padding. I'm not sure exactly how csd and solid-csd classes are supposed to be used. I think none should be used in that case, but I'm not sure.

Edited by Paul Rouget

Merge request reports