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:
Diffstat (limited to 'source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
index 13d9f1ecda7..33532bd0549 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
@@ -120,8 +120,8 @@ void ED_gizmotypes_snap_3d_data_get(const struct bContext *C,
const wmEvent *event = wm->winactive ? wm->winactive->eventstate : NULL;
if (event) {
ARegion *region = CTX_wm_region(C);
- int x = event->x - region->winrct.xmin;
- int y = event->y - region->winrct.ymin;
+ int x = event->xy[0] - region->winrct.xmin;
+ int y = event->xy[1] - region->winrct.ymin;
snap_data = ED_view3d_cursor_snap_data_get(NULL, C, x, y);
}
}
@@ -250,8 +250,8 @@ static int snap_gizmo_test_select(bContext *C, wmGizmo *gz, const int mval[2])
const wmEvent *event = wm->winactive ? wm->winactive->eventstate : NULL;
if (event) {
ARegion *region = CTX_wm_region(C);
- x = event->x - region->winrct.xmin;
- y = event->y - region->winrct.ymin;
+ x = event->xy[0] - region->winrct.xmin;
+ y = event->xy[1] - region->winrct.ymin;
}
else {
x = mval[0];