Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-03-02 00:09:28 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-03-02 00:25:12 +0300
commit9bd586a01e6813a615eab05871803730603e2152 (patch)
treea437902dcc606b7ea3b13d6d7e7ba1168a6428bd /source/blender/editors/interface
parent8e88af99348590e9879dcbfe97bbbc180fc5ec67 (diff)
Fix T95608: Mac issues with drag drop on multi-monitor
Mousemove events are sent to windows. In Windows OS, almost all mousemove events are sent to the window whose mouse cursor is over. On MacOS, the window with mousemove events is always the active window. It doesn't matter if the mouse cursor is inside or outside the window. So, in order for non-active windows to also have events, `WM_window_find_under_cursor` is called to find those windows and send the same events. The problem is that to find the window, `WM_window_find_under_cursor` only has the mouse coordinates available, it doesn't differentiate which monitor these coordinates came from. So the mouse on one monitor may incorrectly send events to a window on another monitor. The solution used is to use a native API on Mac to detect the window under the cursor. For Windows and Linux nothing has changed. Reviewed By: brecht Differential Revision: https://developer.blender.org/D14197
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_eyedropper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c
index fd03cc5e12c..c475e143df0 100644
--- a/source/blender/editors/interface/interface_eyedropper.c
+++ b/source/blender/editors/interface/interface_eyedropper.c
@@ -165,8 +165,7 @@ void datadropper_win_area_find(
*r_win = CTX_wm_window(C);
*r_area = BKE_screen_find_area_xy(screen, SPACE_TYPE_ANY, mval);
if (*r_area == NULL) {
- wmWindowManager *wm = CTX_wm_manager(C);
- *r_win = WM_window_find_under_cursor(wm, NULL, *r_win, mval, r_mval);
+ *r_win = WM_window_find_under_cursor(*r_win, mval, r_mval);
if (*r_win) {
screen = WM_window_get_active_screen(*r_win);
*r_area = BKE_screen_find_area_xy(screen, SPACE_TYPE_ANY, r_mval);