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:
authorJacques Lucke <jacques@blender.org>2020-03-12 21:34:59 +0300
committerJacques Lucke <jacques@blender.org>2020-03-12 21:36:13 +0300
commit649fdc793851a214f54c9ecdaae4c120c4bd11c9 (patch)
tree09ad186adcb69c1924987c31df288d1e6b5fc044 /source/blender/editors/screen/area_query.c
parent11e48277386c1811507878e3ffe7f7e10e26ac20 (diff)
Fix T73049: Drag & drop on overlapping panels behaves incorrectly
Reviewers: brecht, Severin Differential Revision: https://developer.blender.org/D7024
Diffstat (limited to 'source/blender/editors/screen/area_query.c')
-rw-r--r--source/blender/editors/screen/area_query.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/screen/area_query.c b/source/blender/editors/screen/area_query.c
index f8a6b301911..2cccd9a2ba5 100644
--- a/source/blender/editors/screen/area_query.c
+++ b/source/blender/editors/screen/area_query.c
@@ -61,6 +61,18 @@ bool ED_region_overlap_isect_xy(const ARegion *region, const int event_xy[2])
ED_region_overlap_isect_y(region, event_xy[1]));
}
+bool ED_region_overlap_isect_any_xy(const ScrArea *area, const int event_xy[2])
+{
+ LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
+ if (ED_region_is_overlap(area->spacetype, region->regiontype)) {
+ if (ED_region_overlap_isect_xy(region, event_xy)) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_ar_gutter)
{
*r_ar_gutter = region->winrct;