diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Window.cxx | 8 | ||||
| -rw-r--r-- | src/Fl_Window_Driver.H | 1 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 3 |
4 files changed, 13 insertions, 1 deletions
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index e2e0f8237..a8912f31f 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -977,3 +977,11 @@ void Fl_Window::is_maximized_(bool b) { if (b) set_flag(MAXIMIZED); else clear_flag(MAXIMIZED); } + +/** Allow this subwindow to expand outside the area of its parent window. + This is presently implemented only for the Wayland platform to help support window docking. + \since 1.4.0 +*/ +void Fl_Window::allow_expand_outside_parent() { + if (parent()) pWindowDriver->allow_expand_outside_parent(); +} diff --git a/src/Fl_Window_Driver.H b/src/Fl_Window_Driver.H index 552d0804d..cec60a2da 100644 --- a/src/Fl_Window_Driver.H +++ b/src/Fl_Window_Driver.H @@ -207,6 +207,7 @@ public: static void scroll_to_selected_item(Fl_Window *); virtual fl_uintptr_t os_id() { return 0; } + virtual void allow_expand_outside_parent() {} }; #endif // FL_WINDOW_DRIVER_H 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 |
