From 175bc66d7b5ee27c7eadcfd7fe0c924985c4cec6 Mon Sep 17 00:00:00 2001 From: zoniq Date: Fri, 11 Apr 2008 23:55:35 +0000 Subject: [PATCH] Add:gui/internal:some comments git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1004 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/src/gui/internal/gui_internal.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/navit/src/gui/internal/gui_internal.c b/navit/src/gui/internal/gui_internal.c index 503613a..8c4e147 100644 --- a/navit/src/gui/internal/gui_internal.c +++ b/navit/src/gui/internal/gui_internal.c @@ -230,9 +230,13 @@ gui_internal_button(struct gui_priv *this, int pressed, int button, struct point { struct graphics *gra=this->gra; struct point pnt; - if (!this->menu) { - if (!navit_handle_button(this->nav, pressed, button, p, NULL)) + + // if still on the map (not in the menu, yet): + if (!this->menu) { + // check whether the position of the mouse changed during press/release OR if it is the scrollwheel + if (!navit_handle_button(this->nav, pressed, button, p, NULL) || button >=4) return; + // draw menu this->menu++; graphics_draw_mode(gra, draw_mode_begin); gui_internal_clear(this); @@ -240,6 +244,8 @@ gui_internal_button(struct gui_priv *this, int pressed, int button, struct point graphics_draw_mode(gra, draw_mode_end); return; } + + // if already in the menu: if (pressed) { graphics_draw_mode(gra, draw_mode_begin); gui_internal_highlight(this, p); -- 2.7.4