diff options
| -rw-r--r-- | fluid/Fl_Window_Type.cxx | 12 | ||||
| -rw-r--r-- | test/tile.cxx | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 117d180de..dcd31e499 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -337,7 +337,15 @@ void Overlay_Window::draw_overlay() { window->draw_overlay(); } int Overlay_Window::handle(int e) { - return window->handle(e); + int ret = window->handle(e); + if (ret==0) { + switch (e) { + case FL_SHOW: + case FL_HIDE: + ret = Fl_Overlay_Window::handle(e); + } + } + return ret; } Fl_Type *Fl_Window_Type::make() { @@ -1375,7 +1383,7 @@ Fl_Widget_Class_Type *current_widget_class = 0; Fl_Type *Fl_Widget_Class_Type::make() { Fl_Type *p = Fl_Type::current; - while (p && !p->is_decl_block()) p = p->parent; + while (p && (!p->is_decl_block() || (p->is_widget() && p->is_class()))) p = p->parent; Fl_Widget_Class_Type *myo = new Fl_Widget_Class_Type(); myo->name("UserInterface"); diff --git a/test/tile.cxx b/test/tile.cxx index 58b0de0f4..dbd218be2 100644 --- a/test/tile.cxx +++ b/test/tile.cxx @@ -82,8 +82,8 @@ int main(int argc, char** argv) { tile.end(); window.end(); - window.show(argc,argv); w1.show(); + window.show(argc,argv); return Fl::run(); } |
