mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix displaying of embedded Window
Fix Rect of texture to take window and stretch transform into account. There is no need for `viewport_attach_to_screen` for embedded windows, since their display is handled via `Viewport::_sub_window_update`.
This commit is contained in:
parent
4364ed6ccd
commit
0eff41d045
2 changed files with 8 additions and 2 deletions
|
|
@ -1239,7 +1239,7 @@ void Window::_update_viewport_size() {
|
|||
|
||||
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
|
||||
RenderingServer::get_singleton()->viewport_attach_to_screen(get_viewport_rid(), attach_to_screen_rect, window_id);
|
||||
} else {
|
||||
} else if (!is_embedded()) {
|
||||
RenderingServer::get_singleton()->viewport_attach_to_screen(get_viewport_rid(), Rect2i(), DisplayServer::INVALID_WINDOW_ID);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue