From d792ed21f55a8fadbcb0edb99647e5fb3ef01669 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sun, 2 Jun 2024 08:28:40 +0200 Subject: =?UTF-8?q?=20Fix=20Child=20Windows=20under=20Wayland=20are=20clip?= =?UTF-8?q?ped=20on=20resizing=20=E2=80=A6=20(#987)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 2 ++ src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/drivers/Wayland') diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H index 192d82f5a..42967d6b1 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H @@ -56,6 +56,7 @@ private: Fl_Image* shape_; ///< shape image cairo_pattern_t *mask_pattern_; } *shape_data_; + bool can_expand_outside_parent_; // specially to allow window docking (#987) cairo_rectangle_int_t *subRect_; // makes sure subwindow remains inside its parent window static bool in_flush_; // useful for progressive window drawing Fl_Cursor standard_cursor_; // window's standard custom kind @@ -143,6 +144,7 @@ public: static bool new_popup; // to support tall menu buttons bool process_menu_or_tooltip(struct wld_window *); static Fl_Window *previous_floatingtitle; // to support floating menuwindow w/ title + void allow_expand_outside_parent() FL_OVERRIDE { can_expand_outside_parent_ = true; } }; diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 904c878da..be0abf38e 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -70,6 +70,7 @@ Fl_Wayland_Window_Driver::Fl_Wayland_Window_Driver(Fl_Window *win) : Fl_Window_D gl_start_support_ = NULL; subRect_ = NULL; is_popup_window_ = false; + can_expand_outside_parent_ = false; } @@ -1889,7 +1890,7 @@ static bool crect_equal(cairo_rectangle_int_t *to, cairo_rectangle_int_t *with) void Fl_Wayland_Window_Driver::checkSubwindowFrame() { - if (!pWindow->parent()) return; + if (!pWindow->parent() || can_expand_outside_parent_) return; // make sure this subwindow doesn't leak out of its parent window Fl_Window *from = pWindow, *parent; cairo_rectangle_int_t full = {0, 0, pWindow->w(), pWindow->h()}; // full subwindow area -- cgit v1.2.3