From 80444effc62ac91b127cd7811f84c1689eabd7c8 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 6 Mar 2017 00:40:48 +0100 Subject: 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! --- source/blender/windowmanager/wm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/windowmanager/wm.h') diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h index 2f06ddab1e8..e8485359490 100644 --- a/source/blender/windowmanager/wm.h +++ b/source/blender/windowmanager/wm.h @@ -78,6 +78,7 @@ void wm_autosave_location(char *filepath); /* wm_stereo.c */ void wm_method_draw_stereo3d(const bContext *C, wmWindow *win); +void wm_stereo3d_mouse_offset_apply(wmWindow *win, int *r_mouse_xy); int wm_stereo3d_set_exec(bContext *C, wmOperator *op); int wm_stereo3d_set_invoke(bContext *C, wmOperator *op, const wmEvent *event); void wm_stereo3d_set_draw(bContext *C, wmOperator *op); -- cgit v1.2.3