aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2015-01-24 00:21:18 +0000
committercorvid <devnull@localhost>2015-01-24 00:21:18 +0000
commit6959e73ad0a429781abfa3ae222a7061ab40f114 (patch)
tree4ad5040554f6b81456b83177a53b58f90318be0b
parent889d8cb81e168d20ea757a75e81578299902d5f0 (diff)
input init usual_color
Not 'necessary' at present, but valgrind complains and it's always good practice.
-rw-r--r--dw/fltkui.cc11
1 files 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.
*/