summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-22 21:21:08 +0000
committerManolo Gouy <Manolo>2016-03-22 21:21:08 +0000
commitbf7e4de688fc1f0e3008049a41c07543a7da0752 (patch)
treef1ac7f975ece6966c922b4de2cf3ee03c205c7eb /src/Fl_x.cxx
parent6ec8ebc4f83fa2c143bff54e66672226cdf7d85c (diff)
Rewrite Fl_Window::resize() under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11401 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 4ca3ad67d..1bccb6dad 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -2124,34 +2124,34 @@ fprintf(stderr,"\n");*/
////////////////////////////////////////////////////////////////
-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);
+void Fl_X11_Window_Driver::resize(int X,int Y,int W,int H) {
+ int is_a_move = (X != pWindow->x() || Y != pWindow->y());
+ int is_a_resize = (W != pWindow->w() || H != pWindow->h());
+ int resize_from_program = (pWindow != resize_bug_fix);
if (!resize_from_program) resize_bug_fix = 0;
- if (is_a_move && resize_from_program) set_flag(FORCE_POSITION);
+ if (is_a_move && resize_from_program) force_position(1);
else if (!is_a_resize && !is_a_move) return;
if (is_a_resize) {
- Fl_Group::resize(X,Y,W,H);
- if (shown()) {redraw();}
+ pWindow->Fl_Group::resize(X,Y,W,H);
+ if (pWindow->shown()) {pWindow->redraw();}
} else {
x(X); y(Y);
}
- if (resize_from_program && is_a_resize && !resizable()) {
- size_range(w(), h(), w(), h());
+ if (resize_from_program && is_a_resize && !pWindow->resizable()) {
+ pWindow->size_range(pWindow->w(), pWindow->h(), pWindow->w(), pWindow->h());
}
- if (resize_from_program && shown()) {
+ if (resize_from_program && pWindow->shown()) {
if (is_a_resize) {
- if (!resizable()) size_range(w(),h(),w(),h());
+ if (!pWindow->resizable()) pWindow->size_range(pWindow->w(), pWindow->h(), pWindow->w(), pWindow->h());
if (is_a_move) {
- XMoveResizeWindow(fl_display, i->xid, X, Y, W>0 ? W : 1, H>0 ? H : 1);
+ XMoveResizeWindow(fl_display, fl_xid(pWindow), X, Y, W>0 ? W : 1, H>0 ? H : 1);
} else {
- XResizeWindow(fl_display, i->xid, W>0 ? W : 1, H>0 ? H : 1);
+ XResizeWindow(fl_display, fl_xid(pWindow), W>0 ? W : 1, H>0 ? H : 1);
}
} else
- XMoveWindow(fl_display, i->xid, X, Y);
+ XMoveWindow(fl_display, fl_xid(pWindow), X, Y);
}
}