diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-01 04:59:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-01 05:03:02 +0300 |
commit | b147473f023e5ee9c2b8324362a293e65be9d2c8 (patch) | |
tree | 8801e8d435e689c5428d5dcb1c35abd44a63c6c4 /source/blender/windowmanager | |
parent | 4b4695223a7250be808135a527b6016cb0b90782 (diff) |
Fix T44892: Cursor warp, invoked outside the area
If an operator starts outside an area, don't use warping.
(problematic for menu's).
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 06449f5d45e..3a213cd4e2c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1141,7 +1141,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, } if (wrap) { - rcti *winrect = NULL; + const rcti *winrect = NULL; ARegion *ar = CTX_wm_region(C); ScrArea *sa = CTX_wm_area(C); @@ -1150,7 +1150,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, { winrect = &ar->winrct; } - else if (sa) { + else if (sa && BLI_rcti_isect_pt_v(&sa->totrct, &event->x)) { winrect = &sa->totrct; } |