From e438521b9d9dbae42fb2bfa572e410a7f7dca591 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 11 Jun 2019 23:33:35 +0200 Subject: Reset properly after homing --- src/nanolight.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } } -- cgit v1.2.3