diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-07-26 16:01:16 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-07-26 16:01:16 +0200 |
| commit | b740c48ee8505f93662065384d84b449d5e33438 (patch) | |
| tree | e806e2a3774471c95a9542585ef0b2d3c1cd4dec /src | |
| parent | 3cc12d203f30f29a8920b85ee98c46f4c9bb0bcb (diff) | |
Wayland: restore support of Fl_Tile with subwindow widget
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Tile.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_Window_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx index efc2478b7..9874a570b 100644 --- a/src/Fl_Tile.cxx +++ b/src/Fl_Tile.cxx @@ -482,6 +482,8 @@ void Fl_Tile::move_intersection(int oldx, int oldy, int newx, int newy) { } } +bool Fl_Tile::in_drag_intersection_ = false; + /** Drags the intersection at (\p oldx,\p oldy) to (\p newx,\p newy). @@ -532,10 +534,12 @@ void Fl_Tile::drag_intersection(int oldx, int oldy, int newx, int newy) { } } // resize all children that have changed in size + in_drag_intersection_ = true; for (i = 0; i < children(); i++) { Fl_Rect &r = final_size[i]; child(i)->damage_resize(r.x(), r.y(), r.w(), r.h()); } + in_drag_intersection_ = false; delete[] final_size; } else { move_intersection(oldx, oldy, newx, newy); diff --git a/src/Fl_Window_Driver.H b/src/Fl_Window_Driver.H index cec60a2da..924a86967 100644 --- a/src/Fl_Window_Driver.H +++ b/src/Fl_Window_Driver.H @@ -31,6 +31,7 @@ #include <FL/Fl_Export.H> #include <FL/Fl_Window.H> #include <FL/Fl_Overlay_Window.H> +#include <FL/Fl_Tile.H> #include <stdlib.h> @@ -208,6 +209,7 @@ public: virtual fl_uintptr_t os_id() { return 0; } virtual void allow_expand_outside_parent() {} + static bool in_tile_intersection_drag() { return Fl_Tile::in_drag_intersection_; } }; #endif // FL_WINDOW_DRIVER_H diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 3c9fb3c65..7aeb717a5 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1831,7 +1831,7 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) { // When moving or resizing a non-GL subwindow independently from its parent, this condition // delays application of X,Y,W,H values until the compositor signals // it's ready for a new frame using the frame callback mechanism. - if (depth > 1 || pWindow->as_gl_window() || !parent_xid || wait_for_expose_value || (parent_xid->frame_cb && !xid_rect)) { + if (in_tile_intersection_drag() || depth > 1 || pWindow->as_gl_window() || !parent_xid || wait_for_expose_value || (parent_xid->frame_cb && !xid_rect)) { if (is_a_resize) { if (pWindow->parent()) { if (W < 1) W = 1; @@ -1909,7 +1909,7 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) { } Fl_Wayland_Graphics_Driver::buffer_commit(parent_xid); } else { - if (!parent_xid->frame_cb) { + if (!in_tile_intersection_drag() && !parent_xid->frame_cb) { // use the frame callback mechanism and memorize current X,Y,W,H values xid_rect = new xid_and_rect; xid_rect->xid = parent_xid; |
