[Bf-blender-cvs] [12e926781a2] blender2.8: Merge branch 'master' into blender2.8

Campbell Barton noreply at git.blender.org
Wed Jun 20 15:40:44 CEST 2018


Commit: 12e926781a2ea332cb6c0c0e7b32b31c1aea27c5
Author: Campbell Barton
Date:   Wed Jun 20 15:40:14 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB12e926781a2ea332cb6c0c0e7b32b31c1aea27c5

Merge branch 'master' into blender2.8

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



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

diff --cc source/blender/editors/screen/screen_edit.c
index 4d7533d575c,615f47e51c3..8c9182abad0
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@@ -960,8 -1062,8 +960,8 @@@ static void screen_cursor_set(wmWindow 
  	AZone *az = NULL;
  	ScrArea *sa;
  
 -	for (sa = win->screen->areabase.first; sa; sa = sa->next)
 -		if ((az = ED_area_actionzone_find_xy(sa, &event->x)))
 +	for (sa = screen->areabase.first; sa; sa = sa->next)
- 		if ((az = is_in_area_actionzone(sa, xy)))
++		if ((az = ED_area_actionzone_find_xy(sa, xy)))
  			break;
  
  	if (sa) {
@@@ -991,24 -1093,21 +991,24 @@@
  
  /* called in wm_event_system.c. sets state vars in screen, cursors */
  /* event type is mouse move */
 -void ED_screen_set_subwinactive(bContext *C, const wmEvent *event)
 +void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2])
  {
 -	wmWindow *win = CTX_wm_window(C);
 +	bScreen *scr = WM_window_get_active_screen(win);
  
 -	if (win->screen) {
 -		bScreen *scr = win->screen;
 -		ScrArea *sa;
 +	if (scr) {
 +		ScrArea *sa = NULL;
  		ARegion *ar;
 -		int oldswin = scr->subwinactive;
 +		ARegion *old_ar = scr->active_region;
  
 -		for (sa = scr->areabase.first; sa; sa = sa->next) {
 -			if (event->x > sa->totrct.xmin && event->x < sa->totrct.xmax)
 -				if (event->y > sa->totrct.ymin && event->y < sa->totrct.ymax)
 -					if (NULL == ED_area_actionzone_find_xy(sa, &event->x))
 +		ED_screen_areas_iter(win, scr, area_iter) {
 +			if (xy[0] > area_iter->totrct.xmin && xy[0] < area_iter->totrct.xmax) {
 +				if (xy[1] > area_iter->totrct.ymin && xy[1] < area_iter->totrct.ymax) {
- 					if (is_in_area_actionzone(area_iter, xy) == NULL) {
++					if (ED_area_actionzone_find_xy(area_iter, xy) == NULL) {
 +						sa = area_iter;
  						break;
 +					}
 +				}
 +			}
  		}
  		if (sa) {
  			/* make overlap active when mouse over */
diff --cc source/blender/editors/screen/screen_intern.h
index b02198764e0,cd12f30c3bb..89c2b1563c4
--- a/source/blender/editors/screen/screen_intern.h
+++ b/source/blender/editors/screen/screen_intern.h
@@@ -56,18 -50,18 +56,18 @@@ bScreen    *screen_change_prepare(bScre
  ScrArea    *area_split(bScreen *sc, ScrArea *sa, char dir, float fac, int merge);
  int         screen_area_join(struct bContext *C, bScreen *scr, ScrArea *sa1, ScrArea *sa2);
  int         area_getorientation(ScrArea *sa, ScrArea *sb);
 -void        select_connected_scredge(bScreen *sc, ScrEdge *edge);
 +void        select_connected_scredge(const wmWindow *win, ScrEdge *edge);
  
 -void        removenotused_scrverts(bScreen *sc);
 -void        removedouble_scrverts(bScreen *sc);
 -void        removedouble_scredges(bScreen *sc);
 -void        removenotused_scredges(bScreen *sc);
  bool        scredge_is_horizontal(ScrEdge *se);
 -ScrEdge    *screen_find_active_scredge(bScreen *sc,
 -                                       const int winsize_x, const int winsize_y,
 -                                       const int mx, const int my);
 +ScrEdge     *screen_area_map_find_active_scredge(
 +        const struct ScrAreaMap *area_map,
 +        const rcti *bounds_rect,
 +        const int mx, const int my);
 +ScrEdge    *screen_find_active_scredge(
 +        const wmWindow *win, const bScreen *screen,
 +        const int mx, const int my);
  
- struct AZone *is_in_area_actionzone(ScrArea *sa, const int xy[2]);
+ struct AZone *ED_area_actionzone_find_xy(ScrArea *sa, const int xy[2]);
  
  /* screen_context.c */
  int ed_screen_context(
diff --cc source/blender/editors/screen/screen_ops.c
index c2dab7e22dd,d1510f60517..df52ce696d9
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@@ -872,15 -815,10 +872,15 @@@ static int actionzone_modal(bContext *C
  				sad->gesture_dir = 'w';
  
  			if (sad->az->type == AZONE_AREA) {
 +				const wmWindow *win = CTX_wm_window(C);
 +				rcti screen_rect;
 +
 +				WM_window_screen_rect_calc(win, &screen_rect);
  				/* once we drag outside the actionzone, register a gesture
  				 * check we're not on an edge so join finds the other area */
- 				is_gesture = ((is_in_area_actionzone(sad->sa1, &event->x) != sad->az) &&
+ 				is_gesture = ((ED_area_actionzone_find_xy(sad->sa1, &event->x) != sad->az) &&
 -				              (screen_find_active_scredge(sc, winsize_x, winsize_y, event->x, event->y) == NULL));
 +				              (screen_area_map_find_active_scredge(
 +				                   AREAMAP_FROM_SCREEN(sc), &screen_rect, event->x, event->y) == NULL));
  			}
  			else {
  				const int delta_min = 1;



More information about the Bf-blender-cvs mailing list