diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_geometry.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_intern.h | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 00afbf452dd..77f68eed883 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -690,8 +690,10 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2]) ARegion *region_prev = screen->active_region; ED_screen_areas_iter (win, screen, area_iter) { - if (xy[0] > area_iter->totrct.xmin && xy[0] < area_iter->totrct.xmax) { - if (xy[1] > area_iter->totrct.ymin && xy[1] < area_iter->totrct.ymax) { + if (xy[0] > (area_iter->totrct.xmin + BORDERPADDING) && + xy[0] < (area_iter->totrct.xmax - BORDERPADDING)) { + if (xy[1] > (area_iter->totrct.ymin + BORDERPADDING) && + xy[1] < (area_iter->totrct.ymax - BORDERPADDING)) { if (ED_area_azones_update(area_iter, xy) == NULL) { area = area_iter; break; diff --git a/source/blender/editors/screen/screen_geometry.c b/source/blender/editors/screen/screen_geometry.c index 4069795657e..47580c2f4b3 100644 --- a/source/blender/editors/screen/screen_geometry.c +++ b/source/blender/editors/screen/screen_geometry.c @@ -92,7 +92,7 @@ ScrEdge *screen_geom_area_map_find_active_scredge(const ScrAreaMap *area_map, const int mx, const int my) { - int safety = U.widget_unit / 10; + int safety = BORDERPADDING; CLAMP_MIN(safety, 2); diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index 3dfc147bc73..a5e0263104d 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -35,6 +35,9 @@ struct bContextDataResult; #define AZONEFADEIN (5.0f * U.widget_unit) /* when azone is totally visible */ #define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the azone */ +/* Expanded interaction influence of area borders. */ +#define BORDERPADDING (U.dpi_fac + U.pixelsize) + /* area.c */ void ED_area_data_copy(ScrArea *area_dst, ScrArea *area_src, const bool do_free); void ED_area_data_swap(ScrArea *sa1, ScrArea *sa2); |