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>2021-08-31 04:45:26 +0300
committerJeroen Bakker <jeroen@blender.org>2021-09-27 09:28:46 +0300
commit1ff10bb6d188a66a55a5db3957ff068e35baa7ca (patch)
tree2cb9232b87b434f1f385fee79700b4b6c25f1f7a
parent4528c9a357afdfad3ebf5cdf6b3f700d205e27c4 (diff)
Fix 'WM_window_find_under_cursor'
This function was not working if the window is partially out of screen space.
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 7e0a1ec8beb..dbdd5dac5a0 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1943,7 +1943,7 @@ bool WM_window_find_under_cursor(const wmWindowManager *wm,
int scr_pos[2];
wm_window_screen_pos_get(win_iter, desk_pos, scr_pos);
- if (scr_pos[0] >= 0 && win_iter->posy >= 0 && scr_pos[0] <= WM_window_pixels_x(win_iter) &&
+ if (scr_pos[0] >= 0 && scr_pos[1] >= 0 && scr_pos[0] <= WM_window_pixels_x(win_iter) &&
scr_pos[1] <= WM_window_pixels_y(win_iter)) {
*r_win = win_iter;