summaryrefslogtreecommitdiff
path: root/navit/vehicle.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-03-10 12:14:18 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-03-10 12:14:18 +0000
commitf53cd297d716e421c4d510ded66aeb9d7d96f253 (patch)
tree510c65d6fa393eced257835283a87dce78a15d11 /navit/vehicle.c
parenta1a0c71a3a446afc22f9a0f6e5767b07ea440b95 (diff)
downloadnavit-svn-f53cd297d716e421c4d510ded66aeb9d7d96f253.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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/navit/vehicle.c b/navit/vehicle.c
index ae404fc0..bec635ee 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.