summaryrefslogtreecommitdiff
path: root/navit/graphics.c
diff options
context:
space:
mode:
authortegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-08-29 19:19:03 +0000
committertegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-08-29 19:19:03 +0000
commit519426e55bb62c4909ad3cbe8f10b3135b0468e4 (patch)
treea85a22d834be650a4d32fa9c0c296ea47b46670c /navit/graphics.c
parentd312bde16e19de4d360c88e05cd15e5d87f9d606 (diff)
downloadnavit-svn-519426e55bb62c4909ad3cbe8f10b3135b0468e4.tar.gz
fix:core:Do not handle accesskeys for disabled OSDs or when the user is in the menu
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4728 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/graphics.c')
-rw-r--r--navit/graphics.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/navit/graphics.c b/navit/graphics.c
index 8aadea0c..52e8d8ba 100644
--- a/navit/graphics.c
+++ b/navit/graphics.c
@@ -59,6 +59,7 @@
//##############################################################################################################
struct graphics
{
+ struct graphics* parent;
struct graphics_priv *priv;
struct graphics_methods meth;
char *default_font;
@@ -72,6 +73,7 @@ struct graphics
int colormgmt;
int font_size;
GList *selection;
+ int disabled;
};
struct display_context
@@ -270,6 +272,7 @@ struct graphics * graphics_overlay_new(struct graphics *parent, struct point *p,
return NULL;
this_=g_new0(struct graphics, 1);
this_->priv=parent->meth.overlay_new(parent->priv, &this_->meth, p, w, h, alpha, wraparound);
+ this_->parent = parent;
pr.lu.x=0;
pr.lu.y=0;
pr.rl.x=w;
@@ -740,10 +743,16 @@ void graphics_get_text_bbox(struct graphics *this_, struct graphics_font *font,
*/
void graphics_overlay_disable(struct graphics *this_, int disable)
{
+ this_->disabled = disable;
if (this_->meth.overlay_disable)
this_->meth.overlay_disable(this_->priv, disable);
}
+int graphics_is_disabled(struct graphics *this_)
+{
+ return this_->disabled || (this_->parent && this_->parent->disabled);
+}
+
/**
* FIXME
* @param <>