summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2008-06-11 19:20:18 -0400
committerSøren Sandmann <sandmann@redhat.com>2008-06-11 19:20:18 -0400
commitbf6eddc27f69e34a6c03bdb3972c4ed967e12324 (patch)
treec31d3573ae06aeb402959c390c55c561fe434b56
parent8aa85597a7df9b69cfbc2adfad702ba503bc4a35 (diff)
Deal with unknown gdk events
-rw-r--r--scrollarea.c7
-rw-r--r--scrollarea.h1
-rw-r--r--toolbar.c1
3 files changed, 6 insertions, 3 deletions
diff --git a/scrollarea.c b/scrollarea.c
index a5500ae..d5187b9 100644
--- a/scrollarea.c
+++ b/scrollarea.c
@@ -1081,7 +1081,7 @@ process_gdk_event (FooScrollArea *scroll_area,
int y,
GdkEvent *event)
{
- FooScrollAreaEventType input_type = FOO_BUTTON_PRESS;
+ FooScrollAreaEventType input_type = FOO_INVALID;
int button = 0;
if (event->type == GDK_BUTTON_PRESS)
@@ -1101,8 +1101,9 @@ process_gdk_event (FooScrollArea *scroll_area,
input_type = FOO_MOTION;
button = 0;
}
-
- process_event (scroll_area, input_type, x, y, button);
+
+ if (input_type != FOO_INVALID)
+ process_event (scroll_area, input_type, x, y, button);
}
static gboolean
diff --git a/scrollarea.h b/scrollarea.h
index 623c02b..e571fbb 100644
--- a/scrollarea.h
+++ b/scrollarea.h
@@ -18,6 +18,7 @@ typedef struct FooScrollAreaEvent FooScrollAreaEvent;
typedef enum
{
+ FOO_INVALID,
FOO_BUTTON_PRESS,
FOO_BUTTON_RELEASE,
FOO_MOTION
diff --git a/toolbar.c b/toolbar.c
index 7a259a3..23897b1 100644
--- a/toolbar.c
+++ b/toolbar.c
@@ -70,6 +70,7 @@ on_input (FooScrollArea *area,
g_print ("mouse up\n");
break;
+ default:
case FOO_MOTION:
break;
}