Allow timeline widget to take keyboard focus and pass keyboard events on to children.
This commit is contained in:
parent
7e28987f99
commit
a10d86ecfd
|
@ -589,6 +589,8 @@ Timeline::handle ( int m )
|
|||
|
||||
return 1;
|
||||
}
|
||||
default:
|
||||
return Fl_Overlay_Window::handle( m );
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -607,6 +609,8 @@ Timeline::handle ( int m )
|
|||
{
|
||||
case FL_PUSH:
|
||||
{
|
||||
take_focus();
|
||||
|
||||
if ( ! Fl::event_button1() )
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -340,6 +340,10 @@ Track::handle ( int m )
|
|||
|
||||
switch ( m )
|
||||
{
|
||||
case FL_FOCUS:
|
||||
return 1;
|
||||
case FL_UNFOCUS:
|
||||
return 1;
|
||||
case FL_DND_ENTER:
|
||||
printf( "enter\n" );
|
||||
if ( Track_Widget::pushed() && Track_Widget::pushed()->track()->class_name() == class_name() )
|
||||
|
@ -374,7 +378,11 @@ Track::handle ( int m )
|
|||
int retval = r->dispatch( m );
|
||||
|
||||
if ( retval && m == FL_PUSH )
|
||||
{
|
||||
take_focus();
|
||||
|
||||
Track_Widget::pushed( r );
|
||||
}
|
||||
|
||||
if ( retval && m == FL_RELEASE )
|
||||
Track_Widget::pushed( NULL );
|
||||
|
|
Loading…
Reference in New Issue