From be3adb51de21652d64a6839cd5614c5096064c6a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 Apr 2019 16:43:50 +1000 Subject: UI: ignore events in empty region overlap areas - Resizable areas use 2D view bounds. - Header uses the button bounds. - A margin is added to avoid clicking between buttons. - Region resize edges clamp to the 2D view bounds. Resovles T61554 --- source/blender/editors/include/ED_screen.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/editors/include/ED_screen.h') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 5d9c493737c..00771142553 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -403,6 +403,18 @@ void ED_region_generic_tools_region_message_subscribe(const struct bContext *C, struct wmMsgBus *mbus); int ED_region_generic_tools_region_snap_size(const struct ARegion *ar, int size, int axis); +/* area_query.c */ +bool ED_region_overlap_isect_x(const ARegion *ar, const int event_x); +bool ED_region_overlap_isect_y(const ARegion *ar, const int event_y); +bool ED_region_overlap_isect_xy(const ARegion *ar, const int event_xy[2]); +bool ED_region_overlap_isect_x_with_margin(const ARegion *ar, const int event_x, const int margin); +bool ED_region_overlap_isect_y_with_margin(const ARegion *ar, const int event_y, const int margin); +bool ED_region_overlap_isect_xy_with_margin(const ARegion *ar, + const int event_xy[2], + const int margin); + +bool ED_region_contains_xy(const struct ARegion *ar, const int event_xy[2]); + /* interface_region_hud.c */ struct ARegionType *ED_area_type_hud(int space_type); void ED_area_type_hud_clear(struct wmWindowManager *wm, ScrArea *sa_keep); -- cgit v1.2.3