summaryrefslogtreecommitdiff
path: root/src/Fl_Window.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-03-07 21:15:25 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-03-07 21:15:25 +0000
commit12eef8e64d2518c140770529ce6e03f046b33ecf (patch)
tree7c71d0d214f396e1daf3e14424293f3aea93cf59 /src/Fl_Window.cxx
parentb6b99d84e9513405ee381dbf93572914d195fc75 (diff)
Separating Fl_X and Fl_Window_Driver in Fl_Window.
This was needed because Fl_X only exists if a window is mapped, but we need the driver from the very beginning. Adding Fl_X in the ctor would create hidden bugs. Strategy is now to remove system specific stuff from Fl_X and move it one-by-one to Fl_Window_Driver while maintaining a working code base. X11 and WIN32 fixups will follow in 15 minutes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11308 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Window.cxx')
-rw-r--r--src/Fl_Window.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index 54d6e9cc2..c3cb7f498 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -64,17 +64,21 @@ void Fl_Window::_Fl_Window() {
callback((Fl_Callback*)default_callback);
}
-Fl_Window::Fl_Window(int X,int Y,int W, int H, const char *l)
-: Fl_Group(X, Y, W, H, l) {
+Fl_Window::Fl_Window(int X,int Y,int W, int H, const char *l) :
+Fl_Group(X, Y, W, H, l),
+pWindowDriver(Fl_Window_Driver::newWindowDriver(this))
+{
cursor_default = FL_CURSOR_DEFAULT;
_Fl_Window();
set_flag(FORCE_POSITION);
}
-Fl_Window::Fl_Window(int W, int H, const char *l)
+Fl_Window::Fl_Window(int W, int H, const char *l) :
// fix common user error of a missing end() with current(0):
- : Fl_Group((Fl_Group::current(0),0), 0, W, H, l) {
+Fl_Group((Fl_Group::current(0),0), 0, W, H, l),
+pWindowDriver(Fl_Window_Driver::newWindowDriver(this))
+{
cursor_default = FL_CURSOR_DEFAULT;
_Fl_Window();