GNOME Bugzilla – Bug 759899
W32: CSD is not enabled by default
Last modified: 2017-02-18 13:09:10 UTC
W32 is the only backend that doesn't get CSD enabled by default. This can result in a mix of CSD and non-CSD windows (when dialogs are forced to use CSD and/or when some windows are specifically requested to have CSD). Unless there's a compelling reason to keep using non-CSD windows, CSD should become the default. This will be like having GDK_CSD=1 envvar always set. P.S. There *are* reasons to keep using non-CSD windows (see bug 759826), but i'm not sure if anyone cares. P.P.S. I'm a bit uneasy about this due to the fact that there's no GDK_CSD=0 check to *disable* it, whereas there is a GDK_CSD=1 check to enable it. This might piss off some people. In that case maybe adding a GDK_CSD=0 check would be a good idea.
Created attachment 317921 [details] [review] W32: Prefer CSD by default Will make GTK+ more willing to use CSD for all normal windows without being asked to. Lack of desktop composition will, of course, prevent it from using CSD (in theory).
Review of attachment 317921 [details] [review]: Go for it.
I still don't want to commit it without any discussion *and* without a way to disable the code (like GDK_CSD=0 or something) in case anyone objects. I mean, with all the CSD-related W32 bugs i filed recently, i thought it would be obvious that CSD is somewhat more controversial here. Right now my best CSD-related plans consist of a custom resize handler, and i don't have the time to implement it just now, let alone push it upstream.
Created attachment 322156 [details] [review] W32: Prefer CSD by default v2: * Now supports setting GTK_CSD=0 to revert to old behaviour where CSD is only be used by windows that explicitly request it in some way.
Review of attachment 322156 [details] [review]: Fine for me.
Attachment 322156 [details] pushed as 7eb9f5f - W32: Prefer CSD by default
Without knowing about this bug I filed bug 778791 not long ago requesting the exact opposite of what this bug was about: Disable CSD on Windows by default! Find my reasoning in the linked bug. The approach implemented here might improve consistency across GTK applications. However realistically GTK applications only make up a very small percentage of applications running on a Windows PC. While consistency across GTK applications might sound nice, aiming for consistency across all applications running on a system is much more favorable.