Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2017-03-06 02:40:48 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-03-06 03:32:35 +0300
commit80444effc62ac91b127cd7811f84c1689eabd7c8 (patch)
treefa7eaed2e96b42b1b42fd34cb1ed072e0c10c63b /source/blender/editors/interface
parente72af060ab106d261449b56022258d125b231041 (diff)
Multi-View: Map cursor coordinates to visual coordinates
When rendering multi-view in side-by-side or top-bottom mode, we squash the UI to half of its size and draw it twice on screen. That means the cursor coordinates used for UI interaction don't match what's visible on screen. This commit is a little event system hack (tm) to fix this. It has some small glitches with cursor grabbing, but nothing to bad. We'll also use it for viewport HMD support. D1350, thanks for the feedback @dfelinto!
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 734cd02a056..6e3c3c3674a 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7741,7 +7741,8 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
if (ui_but_is_cursor_warp(but)) {
#ifdef USE_CONT_MOUSE_CORRECT
- if (data->ungrab_mval[0] != FLT_MAX) {
+ /* stereo3d has issues with changing cursor location so rather avoid */
+ if (data->ungrab_mval[0] != FLT_MAX && !WM_stereo3d_enabled(data->window, false)) {
int mouse_ungrab_xy[2];
ui_block_to_window_fl(data->region, but->block, &data->ungrab_mval[0], &data->ungrab_mval[1]);
mouse_ungrab_xy[0] = data->ungrab_mval[0];