diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-23 09:43:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-23 09:51:00 +0300 |
commit | be3adb51de21652d64a6839cd5614c5096064c6a (patch) | |
tree | b76f6346673205ed3aeb33a4768bd2a182a4c605 /source/blender/editors/include/ED_screen.h | |
parent | 310f288bb03b4197f54b7d7b6d611669f2604d04 (diff) |
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
Diffstat (limited to 'source/blender/editors/include/ED_screen.h')
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 12 |
1 files changed, 12 insertions, 0 deletions
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); |