Fix Fluid batch mode with Fl_Simple_Terminal.
Fl_Simple_Terminal would connect Fluid to the Display in batch mode. We fix that by creating an Fl_Text_Display instead.
This commit is contained in:
parent
c92f992380
commit
2b1bed470f
@ -614,7 +614,15 @@ public:
|
||||
virtual const char *alt_type_name() {return "fltk::SimpleTerminal";}
|
||||
int is_text_display() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
Fl_Simple_Terminal *myo = new Fl_Simple_Terminal(x,y,w,h);
|
||||
Fl_Widget *myo = 0L;
|
||||
if (batch_mode) {
|
||||
// The Fl_Simple_Terminal constructor attaches a buffer which in turn
|
||||
// opens a connection to the display. In batch mode, we create the
|
||||
// superclass Fl_Text_Display to avoid that.
|
||||
myo = new Fl_Text_Display(x,y,w,h);
|
||||
} else {
|
||||
myo = new Fl_Simple_Terminal(x,y,w,h);
|
||||
}
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Simple_Terminal_Type();}
|
||||
|
Loading…
x
Reference in New Issue
Block a user