diff options
author | Thomas White <taw@physics.org> | 2019-06-11 23:33:35 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-06-11 23:33:35 +0200 |
commit | e438521b9d9dbae42fb2bfa572e410a7f7dca591 (patch) | |
tree | 031b1ab1c0c7e2b8001dd87add9569444f3efdc7 | |
parent | 35ecb47892057c6650fc661a1561a1927ab4e525 (diff) |
Reset properly after homing
-rw-r--r-- | src/nanolight.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nanolight.c b/src/nanolight.c index c4cc480..09f8a40 100644 --- a/src/nanolight.c +++ b/src/nanolight.c @@ -379,12 +379,17 @@ static void home_value(struct nanolight *nl) int n; if ( nl->mouse_orientation ) { + GdkWindow *win = gtk_widget_get_window(nl->da); if ( find_attribute(fix, ATT_PAN, &n) ) { fix->attr_vals[n] = fix->cls->attrs[n].home; } if ( find_attribute(fix, ATT_TILT, &n) ) { fix->attr_vals[n] = fix->cls->attrs[n].home; } + gdk_window_get_device_position_double(win, nl->pointer, + &nl->x_orig, &nl->y_orig, NULL); + set_start_attrs(nl, ATT_PAN); + set_start_attrs(nl, ATT_TILT); } } |