Paul Davis
e002eea388
git-svn-id: svn://localhost/ardour2/trunk@1171 d708f5d6-7413-0410-9779-e7cbd77b26cf
32 lines
558 B
C++
32 lines
558 B
C++
#include <gtkmm2ext/focus_entry.h>
|
|
|
|
using namespace Gtkmm2ext;
|
|
|
|
FocusEntry::FocusEntry ()
|
|
{
|
|
next_release_selects = false;
|
|
}
|
|
|
|
bool
|
|
FocusEntry::on_button_press_event (GdkEventButton* ev)
|
|
{
|
|
if (!has_focus()) {
|
|
next_release_selects = true;
|
|
}
|
|
return Entry::on_button_press_event (ev);
|
|
}
|
|
|
|
bool
|
|
FocusEntry::on_button_release_event (GdkEventButton* ev)
|
|
{
|
|
if (next_release_selects) {
|
|
bool ret = Entry::on_button_release_event (ev);
|
|
select_region (0, -1);
|
|
next_release_selects = false;
|
|
return ret;
|
|
}
|
|
|
|
return Entry::on_button_release_event (ev);
|
|
}
|
|
|