Fix #107789: Prevent area maximizing when dragging #107803

Merged
YimingWu merged 3 commits from ChengduLittleA/blender:drag_prevent_maximize into main 2023-06-07 06:21:08 +02:00
1 changed files with 4 additions and 1 deletions

View File

@ -3341,11 +3341,14 @@ static bool screen_maximize_area_poll(bContext *C)
const wmWindow *win = CTX_wm_window(C);
const bScreen *screen = CTX_wm_screen(C);
const ScrArea *area = CTX_wm_area(C);
ChengduLittleA marked this conversation as resolved Outdated

should be const like those above

should be const like those above
const wmWindowManager *wm = CTX_wm_manager(C);
return ED_operator_areaactive(C) &&
/* Don't allow maximizing global areas but allow minimizing from them. */
((screen->state != SCREENNORMAL) || !ED_area_is_global(area)) &&
/* Don't change temporary screens. */
!WM_window_is_temp_screen(win);
!WM_window_is_temp_screen(win) &&
/* Don't maximize when dragging. */
ChengduLittleA marked this conversation as resolved Outdated

This "Not" is incorrect. This would only allow maximizing if you ARE dragging. You'll need to remove that "!" to do what you want.

This "Not" is incorrect. This would only allow maximizing if you ARE dragging. You'll need to remove that "!" to do what you want.
BLI_listbase_is_empty(&wm->drags);
}
static void SCREEN_OT_screen_full_area(wmOperatorType *ot)