mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
Revert change from r4659 that caused FLUID resize problem (STR #1110)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4703 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+2
-8
@@ -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
|
||||
}
|
||||
@@ -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);
|
||||
@@ -994,7 +989,7 @@ 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) {
|
||||
@@ -1002,9 +997,8 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user