Here is the simplified code which shows the problem [assumed to be invoked as a callback from e.g. a button]:
void preferences(Fl_Widget*, void*)
{
Fl_Window* win = new Fl_Window(540, 330);
win->copy_label("Title");
Fl_Tabs* tabs = new Fl_Tabs(5, 0, 530, 30); // change '30' to '300' to fix
Fl_Group* general = new Fl_Group(5, 30, 530, 250, "Blah");
Fl_Input* usernameInput = new Fl_Input(180, 40, 350, 30, "Username:");
general->end();
tabs->end();
win->end();
win->show();
while (win->shown()) {
Fl::wait();
}
}