From: Ramakrishnan Muthukrishnan Date: Tue, 14 Nov 2023 17:09:34 +0000 (+0530) Subject: use the definitions in screen.h to determine the click area X-Git-Url: https://git.rkrishnan.org/specifications/components//%22%3C?a=commitdiff_plain;h=3c13808f35019954d9e9f0949062d08dd5d6181a;p=pihpsdr.git use the definitions in screen.h to determine the click area --- diff --git a/vfo.c b/vfo.c index 9d9956c..d020e3f 100644 --- a/vfo.c +++ b/vfo.c @@ -1359,11 +1359,13 @@ static gboolean vfo_press_event_cb(GtkWidget *widget, GdkEventButton *event, gpointer data) { // vfo a and b are drawn at x = 280, so it is the y coordinate // that matters. - if (event->x >= 260 && event->y <= 40) { + if (event->x >= VFO_B_X && event->y <= VFO_B_Y) { // vfo B start_vfo(VFO_B); return TRUE; - } else if (event->x >= 260 && event->y > 40) { + } else if (event->x >= VFO_A_X && + event->y > VFO_B_Y && + event->y <= VFO_A_Y) { // vfo A start_vfo(VFO_A); return TRUE;