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:
authorJulian Eisel <julian@blender.org>2021-11-04 14:10:58 +0300
committerJulian Eisel <julian@blender.org>2021-11-04 14:20:37 +0300
commit80a46955d8212f01b77215ab12d479d934e305f4 (patch)
tree538ddd4b47c195df8006456c046d6dce6bad1a20 /source/blender/editors/include/ED_screen.h
parentbfb664b65de2c71ee3d85760ee5dcf83a7c9aa23 (diff)
Fix T92501: Crash when dragging material assets over 3D View regions
Issue was that the context used for dropbox handling and polling didn't match the one used for drawing the dropbox and generating the tooltip text (which would determine the material slot under the cursor, requiring context). The mismatch would happen with overlapping regions. Actually, this patch includes two fixes, each fixing the crash itself: * Store the context from handling & polling and restore it for drawing. * Correct the hovered region lookup for drawing to account for overlayed regions. Note that to properly set up context for drawing, we should also account for the operator context, which isn't done here, see https://developer.blender.org/T92501#1247581.
Diffstat (limited to 'source/blender/editors/include/ED_screen.h')
-rw-r--r--source/blender/editors/include/ED_screen.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 08b6c02a8d0..ef3ff7874df 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -439,6 +439,7 @@ bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_re
bool ED_region_panel_category_gutter_isect_xy(const ARegion *region, const int event_xy[2]);
bool ED_region_contains_xy(const struct ARegion *region, const int event_xy[2]);
+ARegion *ED_area_find_region_xy_visual(const ScrArea *area, int regiontype, const int event_xy[2]);
/* interface_region_hud.c */
struct ARegionType *ED_area_type_hud(int space_type);