FLTK logo

[master] eeed395 - Fix repositioning subwindows.

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] eeed395 - Fix repositioning subwindows. "Matthias Melcher" 11:32 Apr 26  
 
commit eeed39524606f1717dd2634ffe52e4640a606841
Author:     Matthias Melcher <github@matthiasm.com>
AuthorDate: Fri Apr 26 20:19:08 2024 +0200
Commit:     Matthias Melcher <github@matthiasm.com>
CommitDate: Fri Apr 26 20:19:08 2024 +0200

    Fix repositioning subwindows.
    
    The commit f288aea from Feb. 23rd introduced a
    regression where children of subwindows were moved
    inside the subwindow when only the subwindow itself
    was supposed to move. 

 src/Fl_Group.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git src/Fl_Group.cxx src/Fl_Group.cxx
index 5232f6e..2576efe 100644
--- src/Fl_Group.cxx
+++ src/Fl_Group.cxx
@@ -837,7 +837,8 @@ void Fl_Group::resize(int X, int Y, int W, int H) {
 
   if (!resizable() || (dw==0 && dh==0)) {
 
-    if (as_window() && !parent()) // top window
+    // top window and subwindows must not change the position of their children
+    if (as_window())
       dx = dy = 0;
 
     // Check if there's anything to do, otherwise don't call 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'.