diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-09-04 20:01:15 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-09-04 20:01:15 +0000 |
| commit | 3ef18e4b7dbbe9d80007b6d110c6f5c44b2024d4 (patch) | |
| tree | d6a2d4a9164665db80eaa9035d7ad1172d218be8 /fluid/Fl_Widget_Type.cxx | |
| parent | 84360f49f2087b884902e99279d8c9959cb73874 (diff) | |
STR 1416: Fluid would not output the correct code for a window's hotspot
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5412 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Widget_Type.cxx')
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index c91e1c311..be4c2d4d7 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -2196,9 +2196,14 @@ void Fl_Widget_Type::write_widget_code() { write_c("%s%s->deactivate();\n", indent(), var); if (!is_group() && resizable()) write_c("%sFl_Group::current()->resizable(%s);\n", indent(), var); - if (hotspot()) - write_c("%s%s->hotspot(o);\n", indent(), - is_class() ? "this" : name() ? name() : "w"); + if (hotspot()) { + if (is_class()) + write_c("%shotspot(%s);\n", indent(), var); + else if (is_window()) + write_c("%s%s->hotspot(%s);\n", indent(), var, var); + else + write_c("%s%s->window()->hotspot(%s);\n", indent(), var, var); + } } void Fl_Widget_Type::write_extra_code() { |
