summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 3499e5865..fd6111536 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.24.2.24.2.34 2004/05/13 21:02:41 easysw Exp $"
+// "$Id: Fl_x.cxx,v 1.24.2.24.2.35 2004/05/15 22:58:18 easysw Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -921,6 +921,7 @@ int fl_handle(const XEvent& thisevent)
////////////////////////////////////////////////////////////////
void Fl_Window::resize(int X,int Y,int W,int H) {
+ int is_a_move = (X != x() || Y != y());
int is_a_resize = (W != w() || H != h());
int resize_from_program = (this != resize_bug_fix);
if (!resize_from_program) resize_bug_fix = 0;
@@ -940,7 +941,11 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
if (resize_from_program && shown()) {
if (is_a_resize) {
if (!resizable()) size_range(w(),h(),w(),h());
- XMoveResizeWindow(fl_display, i->xid, X, Y, W>0 ? W : 1, H>0 ? H : 1);
+ 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
XMoveWindow(fl_display, i->xid, X, Y);
}
@@ -1275,5 +1280,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.34 2004/05/13 21:02:41 easysw Exp $".
+// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.35 2004/05/15 22:58:18 easysw Exp $".
//