summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-08-29 18:54:18 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-08-29 18:55:01 +0200
commit746135f0aef6e7f45824c22d1a54ac5ab134c1a1 (patch)
treea6949c9d30730d2cecca1b73c997816c1f6632c2 /src/Fl_x.cxx
parent1ca767eb13f2027a1a2c21f68346ff1d7339ff86 (diff)
X11: Fix rescaling of non-resizable window (issue #491)
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index b189dc470..8b839c6e8 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -2119,8 +2119,9 @@ int fl_handle(const XEvent& thisevent)
////////////////////////////////////////////////////////////////
void Fl_X11_Window_Driver::resize(int X,int Y,int W,int H) {
- int is_a_move = (X != x() || Y != y() || Fl_Window::is_a_rescale());
- int is_a_resize = (W != w() || H != h() || Fl_Window::is_a_rescale());
+ int is_a_rescale = Fl_Window::is_a_rescale();
+ int is_a_move = (X != x() || Y != y() || is_a_rescale);
+ int is_a_resize = (W != w() || H != h() || is_a_rescale);
int resize_from_program = (pWindow != resize_bug_fix);
if (!resize_from_program) resize_bug_fix = 0;
if (is_a_move && resize_from_program) force_position(1);
@@ -2145,6 +2146,8 @@ void Fl_X11_Window_Driver::resize(int X,int Y,int W,int H) {
}
}
+ if (is_a_rescale) size_range();
+
if (resize_from_program && shown()) {
float s = Fl::screen_driver()->scale(screen_num());
if (is_a_resize) {