summaryrefslogtreecommitdiffstats
path: root/scene/main/viewport.h
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-06-20 15:50:44 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-06-20 18:06:26 +0200
commita12627765fb8941c0c90dd40616c13677a8f9a1c (patch)
treef0c6f08b37233f6cf8168d1c671b2dd9fcbbd3f4 /scene/main/viewport.h
parentd7af287ce3108f74799a7d0efd59b454253f6f68 (diff)
downloadredot-engine-a12627765fb8941c0c90dd40616c13677a8f9a1c.tar.gz
Embedded Popups store their safe_rect in their embedder
Storing it in the DisplayServer didn't make sense in this case, because the embedded window is unknown to the DisplayServer.
Diffstat (limited to 'scene/main/viewport.h')
-rw-r--r--scene/main/viewport.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index af2907ca6f..e56d69a868 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -338,6 +338,7 @@ private:
struct SubWindow {
Window *window = nullptr;
RID canvas_item;
+ Rect2i parent_safe_rect;
};
// VRS
@@ -461,7 +462,7 @@ private:
void _sub_window_update(Window *p_window);
void _sub_window_grab_focus(Window *p_window);
void _sub_window_remove(Window *p_window);
- int _sub_window_find(Window *p_window);
+ int _sub_window_find(Window *p_window) const;
bool _sub_windows_forward_input(const Ref<InputEvent> &p_event);
SubWindowResize _sub_window_get_resize_margin(Window *p_subwindow, const Point2 &p_point);
@@ -644,6 +645,8 @@ public:
void set_embedding_subwindows(bool p_embed);
bool is_embedding_subwindows() const;
+ void subwindow_set_popup_safe_rect(Window *p_window, const Rect2i &p_rect);
+ Rect2i subwindow_get_popup_safe_rect(Window *p_window) const;
Viewport *get_parent_viewport() const;
Window *get_base_window() const;