[Bf-blender-cvs] [e1b8ed8] master: Multiview: fix Time Sequential crash when screen is fullscreen T44688
Dalai Felinto
noreply at git.blender.org
Mon Jun 8 23:52:43 CEST 2015
Commit: e1b8ed8dd4e83c16d5baddd6e9f9c0a8b6a7afb7
Author: Dalai Felinto
Date: Mon Jun 8 18:40:48 2015 -0300
Branches: master
https://developer.blender.org/rBe1b8ed8dd4e83c16d5baddd6e9f9c0a8b6a7afb7
Multiview: fix Time Sequential crash when screen is fullscreen T44688
ED_screen_duplicate() was never written to support non-fullscreen modes.
This is prior to the hidden ui fullscreen commit, and it's quite ancient
in Blender's code (since Jan/08 - 1363134d)
That's why duplicate window, and new screen operators are disabled when
screen is full.
===================================================================
M source/blender/windowmanager/intern/wm_stereo.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c
index 3f80570..639c6c1 100644
--- a/source/blender/windowmanager/intern/wm_stereo.c
+++ b/source/blender/windowmanager/intern/wm_stereo.c
@@ -481,21 +481,25 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
}
}
else if (win_src->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) {
+ /* ED_screen_duplicate() can't handle other cases yet T44688 */
+ if (win_src->screen->state != SCREENNORMAL) {
+ BKE_report(op->reports, RPT_ERROR,
+ "Failed to switch to Time Sequential mode when in fullscreen");
+ ok = false;
+ }
/* pageflip requires a new window to be created with the proper OS flags */
- if ((win_dst = wm_window_copy_test(C, win_src))) {
+ else if ((win_dst = wm_window_copy_test(C, win_src))) {
if (wm_stereo3d_quadbuffer_supported()) {
BKE_report(op->reports, RPT_INFO, "Quad-buffer window successfully created");
}
else {
wm_window_close(C, wm, win_dst);
win_dst = NULL;
- win_src->stereo3d_format->display_mode = prev_display_mode;
BKE_report(op->reports, RPT_ERROR, "Quad-buffer not supported by the system");
ok = false;
}
}
else {
- win_src->stereo3d_format->display_mode = prev_display_mode;
BKE_report(op->reports, RPT_ERROR,
"Failed to create a window compatible with the time sequential display method");
ok = false;
@@ -521,6 +525,7 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
else {
/* without this, the popup won't be freed freed properly T44688 */
CTX_wm_window_set(C, win_src);
+ win_src->stereo3d_format->display_mode = prev_display_mode;
return OPERATOR_CANCELLED;
}
}
More information about the Bf-blender-cvs
mailing list