summaryrefslogtreecommitdiffstats
path: root/Drawer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Drawer.cpp')
-rw-r--r--Drawer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Drawer.cpp b/Drawer.cpp
index abe8e20..db3dbdf 100644
--- a/Drawer.cpp
+++ b/Drawer.cpp
@@ -52,6 +52,10 @@ gboolean Drawer::eventHandler(GtkWidget *widget, GdkEvent *event, Drawer *drawer
drawer->window->getActiveTool()->getEventHandler()->buttonPress(event->button.button);
return TRUE;
+ case GDK_BUTTON_RELEASE:
+ drawer->window->getActiveTool()->getEventHandler()->buttonRelease(event->button.button);
+ return TRUE;
+
case GDK_SCROLL:
switch(event->scroll.direction) {
case GDK_SCROLL_UP:
@@ -194,12 +198,12 @@ Drawer::Drawer(Window *window, GdkGLConfig *glconfig) : renderer(&window->getEdi
g_signal_connect(G_OBJECT(drawingArea), "configure-event", G_CALLBACK(eventHandler), this);
g_signal_connect(G_OBJECT(drawingArea), "expose-event", G_CALLBACK(eventHandler), this);
g_signal_connect(G_OBJECT(drawingArea), "button-press-event", G_CALLBACK(eventHandler), this);
- //g_signal_connect(G_OBJECT(drawingArea), "button-release-event", G_CALLBACK(eventHandler), this);
+ g_signal_connect(G_OBJECT(drawingArea), "button-release-event", G_CALLBACK(eventHandler), this);
g_signal_connect(G_OBJECT(drawingArea), "enter-notify-event", G_CALLBACK(eventHandler), this);
g_signal_connect(G_OBJECT(drawingArea), "leave-notify-event", G_CALLBACK(eventHandler), this);
g_signal_connect(G_OBJECT(drawingArea), "motion-notify-event", G_CALLBACK(eventHandler), this);
g_signal_connect(G_OBJECT(drawingArea), "scroll-event", G_CALLBACK(eventHandler), this);
- gtk_widget_add_events(drawingArea, GDK_SCROLL_MASK | GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
+ gtk_widget_add_events(drawingArea, GDK_SCROLL_MASK | GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_RELEASE_MASK);
gtk_table_attach(GTK_TABLE(drawer), drawingArea, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL|GTK_EXPAND|GTK_SHRINK), (GtkAttachOptions)(GTK_FILL|GTK_EXPAND|GTK_SHRINK), 0, 0);
hAdjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 0, 10, 100, 100));