diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-03-10 12:14:18 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-03-10 12:14:18 +0000 |
commit | 1da70aa3d221863b7e4bd1ba251d515a00fabdfa (patch) | |
tree | 510c65d6fa393eced257835283a87dce78a15d11 /navit/vehicle.c | |
parent | 406e84023727b264705d98c0a259721ad530f5f9 (diff) | |
download | navit-1da70aa3d221863b7e4bd1ba251d515a00fabdfa.tar.gz |
Fix:Core:Make vehicle cursor have priority over layout cursor
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4323 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/vehicle.c')
-rw-r--r-- | navit/vehicle.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/navit/vehicle.c b/navit/vehicle.c index ae404fc0c..bec635eea 100644 --- a/navit/vehicle.c +++ b/navit/vehicle.c @@ -50,6 +50,7 @@ struct vehicle { // cursor struct cursor *cursor; + int cursor_fixed; struct callback *animate_callback; struct event_timeout *animate_timer; struct point cursor_pnt; @@ -235,7 +236,8 @@ vehicle_add_attr(struct vehicle *this_, struct attr *attr) break; // currently supporting oldstyle cursor config. case attr_cursor: - vehicle_set_cursor(this_, attr->u.cursor); + this_->cursor_fixed=1; + vehicle_set_cursor(this_, attr->u.cursor, 1); break; default: break; @@ -284,9 +286,11 @@ vehicle_remove_attr(struct vehicle *this_, struct attr *attr) * @author Ralph Sennhauser (10/2009) */ void -vehicle_set_cursor(struct vehicle *this_, struct cursor *cursor) +vehicle_set_cursor(struct vehicle *this_, struct cursor *cursor, int overwrite) { struct point sc; + if (this_->cursor_fixed && !overwrite) + return; if (this_->animate_callback) { event_remove_timeout(this_->animate_timer); this_->animate_timer=NULL; // dangling pointer! prevent double freeing. |