13
0
livetrax/libs/gtkmm2ext/focus_entry.cc
Paul Davis e002eea388 frame for fader belt; better focus behaviour for gain display text entry (generalized)
git-svn-id: svn://localhost/ardour2/trunk@1171 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-11-30 04:21:32 +00:00

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);
}