Fix #118765: Show Startup Popup Warning on Main Window #119096

Merged
Harley Acheson merged 1 commits from Harley/blender:Fix118765 into blender-v4.1-release 2024-03-05 21:16:45 +01:00
2 changed files with 10 additions and 0 deletions

View File

@ -3843,6 +3843,11 @@ void wm_test_autorun_warning(bContext *C)
wmWindow *win = (wm->winactive) ? wm->winactive : static_cast<wmWindow *>(wm->windows.first);
if (win) {
/* We want this warning on the Main window, not a child window even if active. See #118765. */
if (win->parent) {
win = win->parent;
}
wmWindow *prevwin = CTX_wm_window(C);
CTX_wm_window_set(C, win);
UI_popup_block_invoke(C, block_create_autorun_warning, nullptr, nullptr);

View File

@ -2029,6 +2029,11 @@ void wm_test_opengl_deprecation_warning(bContext *C)
"Please contact the developer of the add-on to migrate to use 'gpu' module");
if (win) {
/* We want this warning on the Main window, not a child window even if active. See #118765. */
if (win->parent) {
win = win->parent;
}
wmWindow *prevwin = CTX_wm_window(C);
CTX_wm_window_set(C, win);
UI_popup_block_invoke(C, block_create_opengl_usage_warning, nullptr, nullptr);