diff options
author | tegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-12-08 17:25:10 +0000 |
---|---|---|
committer | tegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-12-08 17:25:10 +0000 |
commit | 7aefa7aebefb331f426bfd0a45c81117e098b2d5 (patch) | |
tree | f36c9fea428f8f365e6ce4aba63fa5ab754e0e42 /navit/osd | |
parent | 5c3ef7a12de7d3dc4f3018017032ba16392a01dd (diff) | |
download | navit-svn-7aefa7aebefb331f426bfd0a45c81117e098b2d5.tar.gz |
Fix:osd/core:Fixed mouse click handlers in odometer and stopwatch to support
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3760 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/osd')
-rw-r--r-- | navit/osd/core/osd_core.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c index 15002256..d367947e 100644 --- a/navit/osd/core/osd_core.c +++ b/navit/osd/core/osd_core.c @@ -381,9 +381,14 @@ osd_odometer_click(struct odometer *this, struct navit *nav, int pressed, int bu { struct point bp = this->osd_item.p; osd_wrap_point(&bp, nav); - if ((p->x < bp.x || p->y < bp.y || p->x > bp.x + this->osd_item.w || p->y > bp.y + this->osd_item.h) && !this->osd_item.pressed) + if ((p->x < bp.x || p->y < bp.y || p->x > bp.x + this->osd_item.w || p->y > bp.y + this->osd_item.h || !this->osd_item.configured ) && !this->osd_item.pressed) + return; + if (button != 1) + return; + if (!!pressed == !!this->osd_item.pressed) + return; + if (navit_ignore_button(nav)) return; - navit_ignore_button(nav); if (pressed) { //single click handling if(this->bActive) { //being stopped this->last_coord.x = -1; @@ -624,10 +629,15 @@ osd_stopwatch_click(struct stopwatch *this, struct navit *nav, int pressed, int { struct point bp = this->osd_item.p; osd_wrap_point(&bp, nav); - if ((p->x < bp.x || p->y < bp.y || p->x > bp.x + this->osd_item.w || p->y > bp.y + this->osd_item.h) && !this->osd_item.pressed) + if ((p->x < bp.x || p->y < bp.y || p->x > bp.x + this->osd_item.w || p->y > bp.y + this->osd_item.h || !this->osd_item.configured ) && !this->osd_item.pressed) return; + if (button != 1) + return; + if (!!pressed == !!this->osd_item.pressed) + return; + if (navit_ignore_button(nav)) + return; - navit_ignore_button(nav); if (pressed) { //single click handling if(this->bActive) { @@ -1244,7 +1254,7 @@ struct osd_speed_warner { int announce_on; enum eAnnounceState {eNoWarn=0,eWarningTold=1}; enum eAnnounceState announce_state; - int bTextOnly; //text of label attribute for this osd + int bTextOnly; }; static void @@ -2389,7 +2399,6 @@ osd_auxmap_draw(struct auxmap *this) { int d=10; struct point p; - struct coord *c; struct attr mapset; if (!this->osd_item.configured) |