[gtk/wip/Jehan/gimp-issue-1082-transparent-window] Add patch from GIMP project
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/Jehan/gimp-issue-1082-transparent-window] Add patch from GIMP project
- Date: Fri, 23 Oct 2020 14:12:17 +0000 (UTC)
commit a2c967abfead6b36f2d64b362d9c663f19872be7
Author: Patrick Storz <eduard braun2 gmx de>
Date: Thu Jul 9 18:13:02 2020 +0200
Add patch from GIMP project
This prevents transparent top-level windows from intercepting mouse
events as often the case with screen capturing software, see
https://bugzilla.gnome.org/show_bug.cgi?id=780979
gdk/win32/gdkdevice-win32.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gdk/win32/gdkdevice-win32.c b/gdk/win32/gdkdevice-win32.c
index 190372de2d..3d89290b25 100644
--- a/gdk/win32/gdkdevice-win32.c
+++ b/gdk/win32/gdkdevice-win32.c
@@ -214,6 +214,10 @@ _gdk_device_win32_window_at_position (GdkDevice *device,
* WindowFromPoint() can find our windows, we follow similar logic
* here, and ignore invisible and disabled windows.
*/
+ UINT cwp_flags = CWP_SKIPDISABLED |
+ CWP_SKIPINVISIBLE |
+ CWP_SKIPTRANSPARENT;
+
hwnd = GetDesktopWindow ();
do {
window = gdk_win32_handle_table_lookup (hwnd);
@@ -224,8 +228,7 @@ _gdk_device_win32_window_at_position (GdkDevice *device,
break;
screen_to_client (hwnd, screen_pt, &client_pt);
- hwndc = ChildWindowFromPointEx (hwnd, client_pt, CWP_SKIPDISABLED |
- CWP_SKIPINVISIBLE);
+ hwndc = ChildWindowFromPointEx (hwnd, client_pt, cwp_flags);
/* Verify that we're really inside the client area of the window */
if (hwndc != hwnd)
@@ -236,6 +239,8 @@ _gdk_device_win32_window_at_position (GdkDevice *device,
hwndc = hwnd;
}
+ /* Only ignore top-level transparent windows */
+ cwp_flags &= ~CWP_SKIPTRANSPARENT;
} while (hwndc != hwnd && (hwnd = hwndc, 1));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]