Mixer: Clean up event handling.

This commit is contained in:
Jonathan Moore Liles 2010-01-30 02:38:15 -06:00
parent 3aca0212c4
commit 453d7bcd4e
5 changed files with 11 additions and 24 deletions

View File

@ -43,7 +43,7 @@ protected:
return 1;
}
return Fl_Widget::handle( m );
return Fl_Valuator::handle( m );
}
float

View File

@ -495,18 +495,15 @@ Mixer::save_options ( void )
int
Mixer::handle ( int m )
{
int r = Fl_Group::handle( m );
if ( Fl_Group::handle( m ) )
return 1;
switch ( m )
{
case FL_ENTER:
case FL_LEAVE:
return 1;
default:
return r;
break;
}
// return 0;
return r;
return 0;
}

View File

@ -58,7 +58,7 @@ private:
protected:
virtual int handle ( int m );
int handle ( int m );
public:

View File

@ -546,16 +546,19 @@ Mixer_Strip::handle ( int m )
switch ( m )
{
case FL_KEYBOARD:
{
if ( Fl_Group::handle( m ) )
return 1;
if ( test_press( FL_Menu ) )
if ( Fl::event_key() == FL_Menu )
{
menu_popup( &menu(), x(), y() );
return 1;
}
else
else
return menu().test_shortcut() != 0;
}
break;
case FL_PUSH:
{
if ( Fl_Group::handle( m ) )
@ -576,19 +579,6 @@ Mixer_Strip::handle ( int m )
_focused = false;
damage( FL_DAMAGE_USER1 );
return 1;
/* case FL_ENTER: */
/* name_field->color( FL_BLACK ); */
/* name_field->redraw(); */
/* return 1; */
/* break; */
/* case FL_LEAVE: */
/* name_field->color( _color ); */
/* name_field->redraw(); */
/* return 1; */
/* break; */
default:
return Fl_Group::handle( m );
}
return Fl_Group::handle( m );

View File

@ -462,7 +462,7 @@ Module::handle ( int m )
if ( Fl_Group::handle( m ) )
return 1;
if ( test_press( FL_Menu ) )
if ( Fl::event_key() == FL_Menu )
{
menu_popup( &menu(), x(), y() );
return 1;