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 759899 - W32: CSD is not enabled by default
W32: CSD is not enabled by default
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-12-27 05:20 UTC by LRN
Modified: 2017-02-18 13:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
W32: Prefer CSD by default (1.00 KB, patch)
2015-12-27 05:21 UTC, LRN
none Details | Review
W32: Prefer CSD by default (1.48 KB, patch)
2016-02-23 18:01 UTC, LRN
committed Details | Review

Description LRN 2015-12-27 05:20:55 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.
Comment 1 LRN 2015-12-27 05:21:01 UTC
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).
Comment 2 Ignacio Casal Quinteiro (nacho) 2016-01-14 13:07:05 UTC
Review of attachment 317921 [details] [review]:

Go for it.
Comment 3 LRN 2016-01-14 14:52:34 UTC
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.
Comment 4 LRN 2016-02-23 18:01:01 UTC
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.
Comment 5 Ignacio Casal Quinteiro (nacho) 2016-03-03 07:37:33 UTC
Review of attachment 322156 [details] [review]:

Fine for me.
Comment 6 LRN 2016-03-03 07:44:03 UTC
Attachment 322156 [details] pushed as 7eb9f5f - W32: Prefer CSD by default
Comment 7 Eduard Braun 2017-02-18 13:09:10 UTC
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.