forked from AuroraMiddleware/gtk
examples: Use symbolic names for button numbers
This commit is contained in:
parent
f7c6c97710
commit
80b414efc2
@ -86,11 +86,11 @@ button_press_event_cb (GtkWidget *widget,
|
|||||||
if (surface == NULL)
|
if (surface == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (event->button == 1)
|
if (event->button == GDK_BUTTON_PRIMARY)
|
||||||
{
|
{
|
||||||
draw_brush (widget, event->x, event->y);
|
draw_brush (widget, event->x, event->y);
|
||||||
}
|
}
|
||||||
else if (event->button == 3)
|
else if (event->button == GDK_BUTTON_SECONDARY)
|
||||||
{
|
{
|
||||||
clear_surface ();
|
clear_surface ();
|
||||||
gtk_widget_queue_draw (widget);
|
gtk_widget_queue_draw (widget);
|
||||||
|
Loading…
Reference in New Issue
Block a user