summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Display.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Text_Display.cxx')
-rw-r--r--src/Fl_Text_Display.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index ed1214ae5..deaf46608 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -1,5 +1,5 @@
//
-// Copyright 2001-2021 by Bill Spitzak and others.
+// Copyright 2001-2022 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
// the LGPL for the FLTK library granted by Mark Edel.
//
@@ -486,6 +486,8 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) {
*/
void Fl_Text_Display::recalc_display() {
if (!buffer()) return;
+ // Make sure the display is opened.
+ Fl_Display_Device::display_device();
// did we have scrollbars initially?
unsigned int hscrollbarvisible = mHScrollBar->visible();
unsigned int vscrollbarvisible = mVScrollBar->visible();