From 6959e73ad0a429781abfa3ae222a7061ab40f114 Mon Sep 17 00:00:00 2001 From: corvid Date: Sat, 24 Jan 2015 00:21:18 +0000 Subject: input init usual_color Not 'necessary' at present, but valgrind complains and it's always good practice. --- dw/fltkui.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dw/fltkui.cc b/dw/fltkui.cc index 80dbb7d5..b2d18ba0 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -47,8 +47,7 @@ */ class CustInput2 : public Fl_Input { public: - CustInput2 (int x, int y, int w, int h, const char* l=0) : - Fl_Input(x,y,w,h,l) { placeholder = NULL; showing_placeholder = false; }; + CustInput2 (int x, int y, int w, int h, const char* l=0); ~CustInput2 () { if (placeholder) free(placeholder); }; void set_placeholder(const char *str); int show_placeholder(); @@ -66,6 +65,14 @@ private: int usual_type; }; +CustInput2::CustInput2 (int x, int y, int w, int h, const char* l) : + Fl_Input(x,y,w,h,l) +{ + placeholder = NULL; + showing_placeholder = false; + usual_color = FL_BLACK; /* just init until widget style is set */ +}; + /* * Show normal text. */ -- cgit v1.2.3