Commit: c6f727c667172361ee0cc928faeb5c2b1138ce33
Author: Antony Riakiotakis
Date:   Mon Jun 2 23:53:34 2014 +0300
https://developer.blender.org/rBc6f727c667172361ee0cc928faeb5c2b1138ce33

Set the area rectangle to the whole screen area that spawned the pie
menu.

This means menus are now clipped correctly and their events are handled
in the whole area too, not only inside the bounding box of the buttons.

===================================================================

M       source/blender/editors/interface/interface_regions.c

===================================================================

diff --git a/source/blender/editors/interface/interface_regions.c 
b/source/blender/editors/interface/interface_regions.c
index 8e9b6d5..421e95e 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1579,14 +1579,22 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, 
ARegion *butregion, uiBut
        /* clip block with window boundary */
        ui_popup_block_clip(window, block);
        
-       /* the block and buttons were positioned in window space as in 2.4x, now
-        * these menu blocks are regions so we bring it back to region space.
-        * additionally we add some padding for the menu shadow or rounded 
menus */
-       ar->winrct.xmin = block->rect.xmin - width;
-       ar->winrct.xmax = block->rect.xmax + width;
-       ar->winrct.ymin = block->rect.ymin - width;
-       ar->winrct.ymax = block->rect.ymax + MENU_TOP;
-       
+       if (block->flag & UI_BLOCK_RADIAL) {
+               /* find area that spawned this menu, keep it inside */
+               ScrArea *sa = CTX_wm_area(C);
+
+               ar->winrct = sa->totrct;
+       }
+       else {
+               /* the block and buttons were positioned in window space as in 
2.4x, now
+                * these menu blocks are regions so we bring it back to region 
space.
+                * additionally we add some padding for the menu shadow or 
rounded menus */
+               ar->winrct.xmin = block->rect.xmin - width;
+               ar->winrct.xmax = block->rect.xmax + width;
+               ar->winrct.ymin = block->rect.ymin - width;
+               ar->winrct.ymax = block->rect.ymax + MENU_TOP;
+       }
+
        ui_block_translate(block, -ar->winrct.xmin, -ar->winrct.ymin);
 
        /* adds subwindow */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to