From fd1207b75e357f0f73ca65468f1a88aed43c8ae7 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Wed, 26 Jun 2013 23:42:42 -0700 Subject: [PATCH] Mixer: Clip children when drawing modules. --- mixer/src/Module.C | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mixer/src/Module.C b/mixer/src/Module.C index 34bcd5b..393bafb 100644 --- a/mixer/src/Module.C +++ b/mixer/src/Module.C @@ -627,7 +627,7 @@ Module::draw_box ( int tx, int ty, int tw, int th ) if ( this == Fl::focus() ) { - fl_draw_box( FL_UP_FRAME, x(), y(), w(), h(), selection_color() ); + fl_draw_box( FL_UP_FRAME, tx, ty, tw, th, selection_color() ); } if ( audio_input.size() && audio_output.size() ) @@ -644,9 +644,13 @@ Module::draw_box ( int tx, int ty, int tw, int th ) fl_draw_box( FL_ROUNDED_BOX, tx + tw - 8, ty + 4, 5, 5, is_controlling() ? FL_YELLOW : fl_inactive( FL_YELLOW ) ); } + fl_push_clip( tx + Fl::box_dx(box()), ty + Fl::box_dy(box()), tw - Fl::box_dw(box()), th - Fl::box_dh(box()) ); + Fl_Group::draw_children(); fl_pop_clip(); + + fl_pop_clip(); } void