From 590db8f107ebf58ec47347bab761cd200c8d91ea Mon Sep 17 00:00:00 2001 From: ellson Date: Sun, 29 Jan 2006 23:34:31 +0000 Subject: [PATCH] Having bool != char is catching some real bugs! --- lib/gvc/gvcjob.h | 2 +- lib/gvc/gvevent.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/gvc/gvcjob.h b/lib/gvc/gvcjob.h index af627bb72..ae13e9f58 100644 --- a/lib/gvc/gvcjob.h +++ b/lib/gvc/gvcjob.h @@ -192,10 +192,10 @@ extern "C" { bool fit_mode, needs_refresh, click, - active, has_grown, has_been_rendered; + unsigned char button; /* active button */ pointf pointer; /* pointer position in device units */ pointf oldpointer; /* old pointer position in device units */ diff --git a/lib/gvc/gvevent.c b/lib/gvc/gvevent.c index 330726b73..b6597897f 100644 --- a/lib/gvc/gvevent.c +++ b/lib/gvc/gvevent.c @@ -384,18 +384,18 @@ static void gvevent_button_press(GVJ_t * job, int button, pointf pointer) gvevent_find_current_obj(job, pointer); gvevent_select_current_obj(job); job->click = 1; - job->active = button; + job->button = button; job->needs_refresh = 1; break; case 2: /* pan */ job->click = 1; - job->active = button; + job->button = button; job->needs_refresh = 1; break; case 3: /* insert node or edge */ gvevent_find_current_obj(job, pointer); job->click = 1; - job->active = button; + job->button = button; job->needs_refresh = 1; break; case 4: @@ -424,7 +424,7 @@ static void gvevent_button_press(GVJ_t * job, int button, pointf pointer) static void gvevent_button_release(GVJ_t *job, int button, pointf pointer) { job->click = 0; - job->active = 0; + job->button = 0; } static void gvevent_motion(GVJ_t * job, pointf pointer) @@ -435,7 +435,7 @@ static void gvevent_motion(GVJ_t * job, pointf pointer) if (abs(dx) < EPSILON && abs(dy) < EPSILON) /* ignore motion events with no motion */ return; - switch (job->active) { + switch (job->button) { case 0: /* drag with no button - */ gvevent_find_current_obj(job, pointer); break; -- 2.40.0