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 <mano-wii>2021-08-26 19:26:31 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-08-26 19:49:04 +0300
commitd7b0567f7c9f52383eb91d5e6b96aa9fd65ee1a5 (patch)
tree1e8e368d26d2dc7ca10a558a4193571ba96068f0 /source/blender/editors/interface
parent06a60fe9f70061cd28af3ffcbf075273225d54b2 (diff)
Cleanup: return window in 'WM_window_find_under_cursor'
This better matches other functions like `BKE_screen_find_area_xy`.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_eyedropper_color.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_color.c b/source/blender/editors/interface/interface_eyedropper_color.c
index ba72cecc514..a8542c47fc2 100644
--- a/source/blender/editors/interface/interface_eyedropper_color.c
+++ b/source/blender/editors/interface/interface_eyedropper_color.c
@@ -342,15 +342,13 @@ void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3])
ScrArea *area = BKE_screen_find_area_xy(screen, SPACE_TYPE_ANY, mx, my);
if (area == NULL) {
int mval[2] = {mx, my};
- if (WM_window_find_under_cursor(wm, NULL, win, mval, &win, mval)) {
+ win = WM_window_find_under_cursor(wm, NULL, win, mval, mval);
+ if (win) {
mx = mval[0];
my = mval[1];
screen = WM_window_get_active_screen(win);
area = BKE_screen_find_area_xy(screen, SPACE_TYPE_ANY, mx, my);
}
- else {
- win = NULL;
- }
}
if (area) {