Skip to content

Commit

Permalink
Fix resize bug on OSX (STR #64)
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3037 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Jun 15, 2003
1 parent b46c9b6 commit 0341822
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.4

- OSX window resizing didn't work (STR #64)
- Fixed MacOS X shared library generation (STR #51)
- Several widgets defined their own size() method but
didn't provide an inline method that mapped to the
Expand Down
7 changes: 5 additions & 2 deletions src/Fl_mac.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_mac.cxx,v 1.1.2.47 2003/06/15 04:27:35 easysw Exp $"
// "$Id: Fl_mac.cxx,v 1.1.2.48 2003/06/15 06:10:54 easysw Exp $"
//
// MacOS specific code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -1722,11 +1722,14 @@ void Fl_Window::show() {
*/
void Fl_Window::resize(int X,int Y,int W,int H) {
int is_a_resize = (W != w() || H != h());
// printf("Fl_Winodw::resize(X=%d, Y=%d, W=%d, H=%d), is_a_resize=%d, resize_from_system=%p, this=%p\n",
// X, Y, W, H, is_a_resize, resize_from_system, this);
if (X != x() || Y != y()) set_flag(FL_FORCE_POSITION);
else if (!is_a_resize) return;
if ( (resize_from_system!=this) && (!parent()) && shown()) {
MoveWindow(i->xid, X, Y, 0);
if (is_a_resize) {
if (!resizable()) size_range(W>0 ? W : 1, H>0 ? H : 1, W>0 ? W : 1, H>0 ? H : 1);
SizeWindow(i->xid, W>0 ? W : 1, H>0 ? H : 1, 1);
Rect all; all.top=-32000; all.bottom=32000; all.left=-32000; all.right=32000;
InvalWindowRect( i->xid, &all );
Expand Down Expand Up @@ -1864,6 +1867,6 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) {


//
// End of "$Id: Fl_mac.cxx,v 1.1.2.47 2003/06/15 04:27:35 easysw Exp $".
// End of "$Id: Fl_mac.cxx,v 1.1.2.48 2003/06/15 06:10:54 easysw Exp $".
//

0 comments on commit 0341822

Please sign in to comment.