GNOME Bugzilla – Bug 733671
W32: Non-CSDed windows have unthemed titlebar
Last modified: 2014-07-24 16:04:35 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.
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).
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).
Forgot to add - attachment 281587 [details] [review] is the same as attachment 281585 [details] [review], but without "return;".
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.
Filed bug 733679
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
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?
(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
Attachment 281587 [details] pushed as 9e11bb3 - Remove gdk_win32_input_shape_combine_region()