From 5590928168f6466a919b05b89ab06ec897e6405f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 10 Dec 2011 05:21:00 +0000 Subject: Fix event handling. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3852 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchageModule.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/PatchageModule.cpp') diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp index a78ee57..066ff47 100644 --- a/src/PatchageModule.cpp +++ b/src/PatchageModule.cpp @@ -27,7 +27,10 @@ PatchageModule::PatchageModule( , _name(name) , _type(type) { - signal_moved.connect( + signal_event().connect( + sigc::mem_fun(this, &PatchageModule::on_event)); + + signal_moved().connect( sigc::mem_fun(this, &PatchageModule::store_location)); } @@ -87,10 +90,10 @@ PatchageModule::show_menu(GdkEventButton* ev) } bool -PatchageModule::on_click(GdkEventButton* ev) +PatchageModule::on_event(GdkEvent* ev) { - if (ev->button == 3) { - return show_menu(ev); + if (ev->type == GDK_BUTTON_PRESS && ev->button.button == 3) { + return show_menu(&ev->button); } return false; } -- cgit v1.2.1