Author: matt
Date: 2007-06-18 05:35:42 -0400 (Mon, 18 Jun 2007)
New Revision: 5912
Log:
#1706: changed test/tile to expose issues with reversed order of 'show'. 
Changed Fluid to disallow a widget class inside a widget class, because Fluid 
has no subwindow support.

Modified:
   branches/branch-1.1/fluid/Fl_Window_Type.cxx
   branches/branch-1.1/test/tile.cxx

Modified: branches/branch-1.1/fluid/Fl_Window_Type.cxx
===================================================================
--- branches/branch-1.1/fluid/Fl_Window_Type.cxx        2007-06-18 08:43:37 UTC 
(rev 5911)
+++ branches/branch-1.1/fluid/Fl_Window_Type.cxx        2007-06-18 09:35:42 UTC 
(rev 5912)
@@ -337,7 +337,15 @@
   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_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");
 

Modified: branches/branch-1.1/test/tile.cxx
===================================================================
--- branches/branch-1.1/test/tile.cxx   2007-06-18 08:43:37 UTC (rev 5911)
+++ branches/branch-1.1/test/tile.cxx   2007-06-18 09:35:42 UTC (rev 5912)
@@ -82,8 +82,8 @@
 
   tile.end();
   window.end();
+  w1.show();
   window.show(argc,argv);
-  w1.show();
   return Fl::run();
 }
 

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to