Author: manolo
Date: 2012-05-24 12:56:20 -0700 (Thu, 24 May 2012)
New Revision: 9545
Log:
Fixed subwindow positioning.
Modified:
branches/branch-3.0/include/FL/Fl_Widget.H
branches/branch-3.0/src/fltk3/x11.cxx
Modified: branches/branch-3.0/include/FL/Fl_Widget.H
===================================================================
--- branches/branch-3.0/include/FL/Fl_Widget.H 2012-05-24 09:11:30 UTC (rev
9544)
+++ branches/branch-3.0/include/FL/Fl_Widget.H 2012-05-24 19:56:20 UTC (rev
9545)
@@ -233,7 +233,13 @@
}
Fl_Window* window() const {
- return fltk3::_3to1_window( ((fltk3::Widget_I*)_p)->window() );
+ fltk3::Window* win3 = ((fltk3::Widget_I*)_p)->window();
+ if (win3 && !win3->wrapper()) {
+ Fl_Widget* win1 = new Fl_Widget();
+ win3->wrapper(win1);
+ win1->_p = win3;
+ }
+ return fltk3::_3to1_window( win3 );
}
uchar type() const {
Modified: branches/branch-3.0/src/fltk3/x11.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/x11.cxx 2012-05-24 09:11:30 UTC (rev
9544)
+++ branches/branch-3.0/src/fltk3/x11.cxx 2012-05-24 19:56:20 UTC (rev
9545)
@@ -1795,7 +1795,7 @@
int X = win->x();
int Y = win->y();
- if (win->parent()) {
+ if (win->parent() && !win->parent()->as_window()) {
X += win->parent()->dx_window();
Y += win->parent()->dy_window();
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit