summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-01-25 19:10:47 +0100
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-01-27 09:47:44 +0100
commit80b414efc255c1b68132d928f984b61a16e48307 (patch)
tree12adbaede25bc9658931b6394ebb6ad26985d35e /examples
parentf7c6c97710488465f0866dcf90603f02cb493956 (diff)
downloadgtk+-80b414efc255c1b68132d928f984b61a16e48307.tar.gz
examples: Use symbolic names for button numbers
Diffstat (limited to 'examples')
-rw-r--r--examples/drawing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/drawing.c b/examples/drawing.c
index 1534b451bc..68fb81eabc 100644
--- a/examples/drawing.c
+++ b/examples/drawing.c
@@ -86,11 +86,11 @@ button_press_event_cb (GtkWidget *widget,
if (surface == NULL)
return FALSE;
- if (event->button == 1)
+ if (event->button == GDK_BUTTON_PRIMARY)
{
draw_brush (widget, event->x, event->y);
}
- else if (event->button == 3)
+ else if (event->button == GDK_BUTTON_SECONDARY)
{
clear_surface ();
gtk_widget_queue_draw (widget);