|
|
@ -463,23 +463,23 @@ int fl_handle(const XEvent& xevent) |
|
|
|
////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
void Fl_Window::resize(int X,int Y,int W,int H) { |
|
|
|
void Fl_Window::resize(int X,int Y,int W,int H) { |
|
|
|
if (resize_bug_fix == this) |
|
|
|
int is_a_resize = (W != w() || H != h()); |
|
|
|
resize_bug_fix = 0; |
|
|
|
int resize_from_program = (this != resize_bug_fix); |
|
|
|
else if (shown()) { |
|
|
|
if (!resize_from_program) resize_bug_fix = 0; |
|
|
|
// tell X window manager to change window size:
|
|
|
|
if (X != x() || Y != y()) set_flag(FL_FORCE_POSITION); |
|
|
|
if (!(flags()&FL_FORCE_POSITION) && X == x() && Y == y()) |
|
|
|
else if (!is_a_resize) return; |
|
|
|
XResizeWindow(fl_display, i->xid, W>0 ? W : 1, H>0 ? H : 1); |
|
|
|
if (is_a_resize) { |
|
|
|
else if (W != w() || H != h()) |
|
|
|
Fl_Group::resize(X,Y,W,H); |
|
|
|
|
|
|
|
if (shown()) {redraw(); i->wait_for_expose = 1;} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
x(X); y(Y); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (resize_from_program && shown()) { |
|
|
|
|
|
|
|
if (is_a_resize) |
|
|
|
XMoveResizeWindow(fl_display, i->xid, X, Y, W>0 ? W : 1, H>0 ? H : 1); |
|
|
|
XMoveResizeWindow(fl_display, i->xid, X, Y, W>0 ? W : 1, H>0 ? H : 1); |
|
|
|
else |
|
|
|
else |
|
|
|
XMoveWindow(fl_display, i->xid, X, Y); |
|
|
|
XMoveWindow(fl_display, i->xid, X, Y); |
|
|
|
} |
|
|
|
} |
|
|
|
if (X != x() || Y != y()) set_flag(FL_FORCE_POSITION); |
|
|
|
|
|
|
|
if (W != w() || H != h()) Fl_Group::resize(X,Y,W,H); else {x(X); y(Y);} |
|
|
|
|
|
|
|
// Notice that this does *not* set any redraw bits. I assumme
|
|
|
|
|
|
|
|
// I will receive damage for the whole window from X. I think
|
|
|
|
|
|
|
|
// that "ForgetGravity" forces the expose event for the entire
|
|
|
|
|
|
|
|
// window, but this may not be true on some implementations.
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////
|
|
|
|