Skip to content

Commit

Permalink
Revert change from r4659 that caused FLUID resize problem (STR #1110)
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4703 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Dec 14, 2005
1 parent 7dd1ddb commit f4b83b8
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Fl_x.cxx
Expand Up @@ -944,7 +944,6 @@ int fl_handle(const XEvent& thisevent)

// tell Fl_Window about it and set flag to prevent echoing:
resize_bug_fix = window;
// printf("ConfigureNotify: X,Y,W,H=%d,%d,%d,%d\n", X, Y, W, H);
window->resize(X, Y, W, H);
break; // allow add_handler to do something too
}
Expand Down Expand Up @@ -973,10 +972,6 @@ int fl_handle(const XEvent& thisevent)
////////////////////////////////////////////////////////////////

void Fl_Window::resize(int X,int Y,int W,int H) {
// printf("Fl_Window::resize(X=%d,Y=%d,W=%d,H=%d)\n", X, Y, W, H);
// printf(" resize_bug_fix=%p\n", resize_bug_fix);
// printf(" this=%p\n", this);

int is_a_move = (X != x() || Y != y());
int is_a_resize = (W != w() || H != h());
int resize_from_program = (this != resize_bug_fix);
Expand All @@ -994,17 +989,16 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
size_range(w(), h(), w(), h());
}

if (shown()) {
if (resize_from_program && shown()) {
if (is_a_resize) {
if (!resizable()) size_range(w(),h(),w(),h());
if (is_a_move) {
XMoveResizeWindow(fl_display, i->xid, X, Y, W>0 ? W : 1, H>0 ? H : 1);
} else {
XResizeWindow(fl_display, i->xid, W>0 ? W : 1, H>0 ? H : 1);
}
} else if (resize_from_program) {
} else
XMoveWindow(fl_display, i->xid, X, Y);
}
}
}

Expand Down

0 comments on commit f4b83b8

Please sign in to comment.