diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-30 08:16:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-30 08:16:04 +0300 |
commit | 5a40c7952007a59bab2ae952d31885e6814c713e (patch) | |
tree | 5a325210dc219538e81801716e32d841ba8325c2 /source/blender | |
parent | a9a048c726c1f8bbd99f711f93d28ea37027728a (diff) | |
parent | 2ed847317e7da8de86846766c54f40c5ee7cee73 (diff) |
Merge branch 'blender-v2.93-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 1 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 14 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 3 |
3 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 419239d5b7a..c46f0f78eb5 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -304,6 +304,7 @@ void ED_operatortypes_workspace(void); /* operators; context poll callbacks */ bool ED_operator_screenactive(struct bContext *C); +bool ED_operator_screenactive_nobackground(struct bContext *C); bool ED_operator_screen_mainwinactive(struct bContext *C); bool ED_operator_areaactive(struct bContext *C); bool ED_operator_regionactive(struct bContext *C); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 5b371ed2caa..eadc18de443 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -141,6 +141,14 @@ bool ED_operator_screenactive(bContext *C) return true; } +bool ED_operator_screenactive_nobackground(bContext *C) +{ + if (G.background) { + return false; + } + return ED_operator_screenactive(C); +} + /* XXX added this to prevent anim state to change during renders */ static bool ED_operator_screenactive_norender(bContext *C) { @@ -4959,7 +4967,7 @@ static void SCREEN_OT_userpref_show(struct wmOperatorType *ot) /* api callbacks */ ot->exec = userpref_show_exec; - ot->poll = ED_operator_screenactive; + ot->poll = ED_operator_screenactive_nobackground; /* Not in background as this opens a window. */ } /** \} */ @@ -5036,7 +5044,7 @@ static void SCREEN_OT_drivers_editor_show(struct wmOperatorType *ot) /* api callbacks */ ot->exec = drivers_editor_show_exec; - ot->poll = ED_operator_screenactive; + ot->poll = ED_operator_screenactive_nobackground; /* Not in background as this opens a window. */ } /** \} */ @@ -5080,7 +5088,7 @@ static void SCREEN_OT_info_log_show(struct wmOperatorType *ot) /* api callbacks */ ot->exec = info_log_show_exec; - ot->poll = ED_operator_screenactive; + ot->poll = ED_operator_screenactive_nobackground; } /** \} */ diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 6f98ecfd621..9175eb2dbf7 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1911,6 +1911,9 @@ static bool wm_operator_winactive_normal(bContext *C) if (!((screen = WM_window_get_active_screen(win)) && (screen->state == SCREENNORMAL))) { return 0; } + if (G.background) { + return 0; + } return 1; } |