From 2bf787ce693cadea52097cdeadafdd509418754a Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 24 Mar 2005 13:14:43 +0000 Subject: Resizing or moving a window through the widget panel now resets the window size_range() so that the window can still be resized through the window manager controls... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4180 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fl_Widget_Type.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'fluid') diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index af8331d45..5557eb679 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -423,7 +423,11 @@ void x_cb(Fl_Value_Input *i, void *v) { if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; w->resize((int)i->value(), w->y(), w->w(), w->h()); - if (w->window()) w->window()->redraw(); + if (w->window()) w->window(); + if (o->is_window()) { + ((Fl_Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(), + gridx, gridy, 0); + } } } } @@ -441,6 +445,10 @@ void y_cb(Fl_Value_Input *i, void *v) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; w->resize(w->x(), (int)i->value(), w->w(), w->h()); if (w->window()) w->window()->redraw(); + if (o->is_window()) { + ((Fl_Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(), + gridx, gridy, 0); + } } } } @@ -458,6 +466,10 @@ void w_cb(Fl_Value_Input *i, void *v) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; w->resize(w->x(), w->y(), (int)i->value(), w->h()); if (w->window()) w->window()->redraw(); + if (o->is_window()) { + ((Fl_Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(), + gridx, gridy, 0); + } } } } @@ -475,6 +487,10 @@ void h_cb(Fl_Value_Input *i, void *v) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; w->resize(w->x(), w->y(), w->w(), (int)i->value()); if (w->window()) w->window()->redraw(); + if (o->is_window()) { + ((Fl_Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(), + gridx, gridy, 0); + } } } } -- cgit v1.2.3