FLTK logo

[master] 746135f - X11: Fix rescaling of non-resizable window (issue #491)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 746135f - X11: Fix rescaling of non-resizable window (issue #491) "Albrecht Schlosser" Aug 29, 2022  
 
commit 746135f0aef6e7f45824c22d1a54ac5ab134c1a1
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Mon Aug 29 18:54:18 2022 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Mon Aug 29 18:55:01 2022 +0200

    X11: Fix rescaling of non-resizable window (issue #491)

 src/Fl_x.cxx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git src/Fl_x.cxx src/Fl_x.cxx
index b189dc4..8b839c6 100644
--- src/Fl_x.cxx
+++ 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) {
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.