diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-06-29 14:57:54 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-06-29 14:57:54 +0200 |
| commit | 1c6a0c1a8fb254945179276ecbd359cc1926fbb1 (patch) | |
| tree | 7ee3c70b3a49b60cbb62e80d3f5627ca8b37ee0e /src/Fl_Group.cxx | |
| parent | 55daede41d451d90d8fa71aa377e0f5e3a4eaf75 (diff) | |
Wayland: fix interactive moving and resizing of a subwindow - cont'd (#987)
This fix requires to be able to recognize whether Fl_Wayland_Window_Driver::resize() is called
by a resize operation of an encompassing widget or not.
To do that, private static int variable group_resize_depth_ is added to class Fl_Group
and an accessor to this variable is added to class Fl_Window_Driver.
Diffstat (limited to 'src/Fl_Group.cxx')
| -rw-r--r-- | src/Fl_Group.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx index 2576efea7..e6d942e32 100644 --- a/src/Fl_Group.cxx +++ b/src/Fl_Group.cxx @@ -809,6 +809,8 @@ int* Fl_Group::sizes() return sizes_; } +int Fl_Group::group_resize_depth_ = 0; + /** Resizes the Fl_Group widget and all of its children. @@ -857,6 +859,7 @@ void Fl_Group::resize(int X, int Y, int W, int H) { // Part 2: here we definitely have a resizable() widget, resize children else if (children_) { + group_resize_depth_++; // get changes in size/position from the initial size: dx = X - p->x(); @@ -905,6 +908,7 @@ void Fl_Group::resize(int X, int Y, int W, int H) { o->resize(L+dx, T+dy, R-L, B-T); } + group_resize_depth_--; } // End of part 2: we have a resizable() widget } |
