Bugfix 21333
authorTon Roosendaal <ton@blender.org>
Wed, 15 Dec 2010 15:28:03 +0000 (15:28 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 15 Dec 2010 15:28:03 +0000 (15:28 +0000)
"Continuous grab": the boundary is now set to Area (editor), making it work
for operators started in other regions (like toolbar, or in quad view case)

source/blender/windowmanager/intern/wm_event_system.c

index 08b50ef9d3f40b241ef5764fd031bca604011e6b..77dfa015d6894038e904c5c018c125ef2f9d6e01 100644 (file)
@@ -683,12 +683,12 @@ int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerR
                                }
 
                                if(wrap) {
-                                       ARegion *ar= CTX_wm_region(C);
-                                       if(ar) {
-                                               bounds[0]= ar->winrct.xmin;
-                                               bounds[1]= ar->winrct.ymax;
-                                               bounds[2]= ar->winrct.xmax;
-                                               bounds[3]= ar->winrct.ymin;
+                                       ScrArea *sa= CTX_wm_area(C);
+                                       if(sa) {
+                                               bounds[0]= sa->totrct.xmin;
+                                               bounds[1]= sa->totrct.ymax;
+                                               bounds[2]= sa->totrct.xmax;
+                                               bounds[3]= sa->totrct.ymin;
                                        }
                                }