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 733671 - W32: Non-CSDed windows have unthemed titlebar
W32: Non-CSDed windows have unthemed titlebar
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: 2014-07-24 13:53 UTC by LRN
Modified: 2014-07-24 16:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove gdk_win32_input_shape_combine_region() (1.56 KB, patch)
2014-07-24 13:53 UTC, LRN
none Details | Review
Remove gdk_win32_input_shape_combine_region() (1.54 KB, patch)
2014-07-24 14:07 UTC, LRN
committed Details | Review

Description LRN 2014-07-24 13:53:07 UTC
This happens because as of 3aa1350bd0f5e2439b9def24599d3a41a4df7de4 gtk
calls input shape function for all windows, even non-CSDed ones, and that
function was not implemented correctly in the backend.
Comment 1 LRN 2014-07-24 13:53:13 UTC
Created attachment 281585 [details] [review]
Remove gdk_win32_input_shape_combine_region()

This function currently calls gdk_win32_window_shape_combine_region(),
which is wrong, because it leads to SetWindowRgn() being called with
non-NULL region, which makes W32 disable theming (particularly - decoration
theming), which makes decorations revert back to old GDI-drawn Windows 2000
variant, which looks out of place and interacts *badly* with alpha channel
(because GDI).
Comment 2 LRN 2014-07-24 14:07:57 UTC
Created attachment 281587 [details] [review]
Remove gdk_win32_input_shape_combine_region()

This function currently calls gdk_win32_window_shape_combine_region(),
which is wrong, because it leads to SetWindowRgn() being called with
non-NULL region, which makes W32 disable theming (particularly - decoration
theming), which makes decorations revert back to old GDI-drawn Windows 2000
variant, which looks out of place and interacts *badly* with alpha channel
(because GDI).
Comment 3 LRN 2014-07-24 14:09:47 UTC
Forgot to add - attachment 281587 [details] [review] is the same as attachment 281585 [details] [review], but without "return;".
Comment 4 Ignacio Casal Quinteiro (nacho) 2014-07-24 14:09:51 UTC
Review of attachment 281587 [details] [review]:

Patch is fine for me, maybe as an extra could you extend on the bug report about this WM_NCHITTEST thing? i.e a point to the docs, where we should use it etc. Or maybe open a new bug report about it.
Comment 5 LRN 2014-07-24 14:20:45 UTC
Filed bug 733679
Comment 6 Matthias Clasen 2014-07-24 14:38:14 UTC
Review of attachment 281587 [details] [review]:

Note that we do have gdk_display_supports_input_shapes() does win32 return FALSE for it ?

::: gdk/win32/gdkwindow-win32.c
@@ +3230,3 @@
+  /* Input shapes are not supported: input shape is always the same as
+     the window shape; pixels with alpha == 0 are usually not clickable,
+     clickability can be overriden by handling WM_NCHITTEST. */

pet peeve: line up *'s at the left, and move the closing */ to the next line
Comment 7 LRN 2014-07-24 15:09:28 UTC
A grep for gdk_display_supports_input_shapes() shows that it's only called by the x11 backend.

gdk_win32_display_supports_input_shapes() is implemented as "return FALSE", so yes, it probably does return FALSE. However, this function is never called by the shape-compiner implementation, as noted above.

Any changes (other than comment style) needed to the patch?
Comment 8 Matthias Clasen 2014-07-24 15:10:48 UTC
(In reply to comment #7)
> A grep for gdk_display_supports_input_shapes() shows that it's only called by
> the x11 backend.
> 
> gdk_win32_display_supports_input_shapes() is implemented as "return FALSE", so
> yes, it probably does return FALSE. However, this function is never called by
> the shape-compiner implementation, as noted above.
> 
> Any changes (other than comment style) needed to the patch?

No, just the style fixup. Feel free to push with that
Comment 9 LRN 2014-07-24 16:04:30 UTC
Attachment 281587 [details] pushed as 9e11bb3 - Remove gdk_win32_input_shape_combine_region()