diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-11-15 16:05:14 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-11-15 16:05:14 +0100 |
| commit | 69189c8f070c9e3347dae6cc835e5f510eca989f (patch) | |
| tree | e35b11fe4b510026819a8e89c58b9ee98a8adb77 | |
| parent | d5a9be6b5e250a4af4d10cdc1ab1b90d1a7a7f84 (diff) | |
FLUID: Fixes missing DISPLAY connection.
Fl_Terminal opens the X11 Display before shown, so we need
to generate a proxy in batch mode. This will no longer work
when we add more Fl_Terminal attributes to FLUID.
| -rw-r--r-- | fluid/Fl_Grid_Type.cxx | 2 | ||||
| -rw-r--r-- | fluid/factory.cxx | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/fluid/Fl_Grid_Type.cxx b/fluid/Fl_Grid_Type.cxx index d0910619b..6621a2f03 100644 --- a/fluid/Fl_Grid_Type.cxx +++ b/fluid/Fl_Grid_Type.cxx @@ -166,7 +166,7 @@ void Fl_Grid_Proxy::move_cell(Fl_Widget *in_child, int to_row, int to_col, int h \param[in] row, col, row_span, col_span, align cell parameters */ Fl_Grid::Cell* Fl_Grid_Proxy::transient_widget(Fl_Widget *wi, int row, int col, int row_span, int col_span, Fl_Grid_Align align) { - int i; + int i = 0; bool remove_old_cell = false; Cell *old_cell = cell(wi); if (old_cell) { diff --git a/fluid/factory.cxx b/fluid/factory.cxx index 79794ce2d..42f317dae 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -856,11 +856,15 @@ public: // Older .fl files with Fl_Simple_Terminal will create a Fl_Terminal instead. const char *alt_type_name() FL_OVERRIDE { return "Fl_Simple_Terminal"; } Fl_Widget *widget(int x, int y, int w, int h) FL_OVERRIDE { - Fl_Terminal *term = new Fl_Terminal(x, y, w, h); - if (!batch_mode) { + Fl_Widget *ret = NULL; + if (batch_mode) { + ret = new Fl_Group(x, y, w, h); + } else { + Fl_Terminal *term = new Fl_Terminal(x, y, w, h); //term->append("> ls -als"); // TODO: text color does not show + ret = term; } - return term; + return ret; } // int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE { // Fl_Terminal *myo = (Fl_Terminal*)(w==4 ? ((Fl_Widget_Type*)factory)->o : o); |
