Examples from Chapter 12 of Programming Principles and Practice Using C++ require redraw to work on OS X
<p>I cannot get the examples from Chapter 12 of "Programming Principles and Practice Using C++" to work without adding a call to redraw() in Simple_window::wait_for_button().</p>

<p>Here is my modified version of that method:</p>

<pre><code>bool Simple_window::wait_for_button()
// modified event loop:
// handle all events (as per default), quit when button_pushed becomes true
// this allows graphics without control inversion
{
    show();
    button_pushed = false;
    // Widgets will not display without this
    redraw();
#if 1
    // Simpler handler
    while (!button_pushed) Fl::wait();
    Fl::redraw();
#else
    // To handle the case where the user presses the X button in the window frame
    // to kill the application, change the condition to 0 to enable this branch.
    Fl::run();
#endif
    return button_pushed;
}
</code></pre>

<p>This is on OS X 10.8 Mountain Lion. I installed FLTK 1.3.2 using Homebrew.</p>

<p>Does anyone have any idea why I have to do this?</p>
