W32: Implement rudimentary WM_NCHITTEST handling

Use (cairo) input shape of the window to check whether a point is inside or not
inside the window.
If it is, let the default window procedure do its thing (which seems to be
working all right in all known cases).
If it isn't, override the default window procedure and tell WM what we think.

Don't do any of the above if the window has CSD-incompatible styles (WS_BORDER
or WS_THICKFRAME).

This is a crude kind of substitute for window input shape support (which W32
does not seem to have). Still probably enough to be positive about input shapes
support.

https://bugzilla.gnome.org/show_bug.cgi?id=733679
This commit is contained in:
Руслан Ижбулатов
2014-07-24 16:27:09 +00:00
parent 341108d4fc
commit a23c29c0fb
3 changed files with 49 additions and 8 deletions

View File

@ -533,11 +533,8 @@ gdk_win32_display_supports_input_shapes (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
/* Not yet implemented. See comment in
* gdk_window_input_shape_combine_mask().
*/
return FALSE;
/* Partially supported, see WM_NCHITTEST handler. */
return TRUE;
}
static gboolean