summaryrefslogtreecommitdiff
path: root/fluid/Fl_Widget_Type.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'fluid/Fl_Widget_Type.cxx')
-rw-r--r--fluid/Fl_Widget_Type.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 96c22acea..c979799ac 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -1267,7 +1267,7 @@ void Fl_Widget_Type::write_code1() {
if (varused) write_c("{ %s* o = ", t);
if (name()) write_c("%s = ", name());
if (is_window()) {
- write_c("w = new %s(%d, %d", t, o->w(), o->h());
+ write_c("new %s(%d, %d", t, o->w(), o->h());
// prevent type() code from being emitted:
((Fl_Widget_Type*)factory)->o->type(o->type());
} else {
@@ -1279,6 +1279,7 @@ void Fl_Widget_Type::write_code1() {
}
write_c(");\n");
indentation += 2;
+ if (is_window()) write_c("%sw = o;\n", indent());
if (varused) write_widget_code();
}