summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/decal.cpp2
-rw-r--r--scene/gui/label.cpp4
-rw-r--r--scene/main/window.cpp6
3 files changed, 11 insertions, 1 deletions
diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp
index e122adcc8c..6f2717fd41 100644
--- a/scene/3d/decal.cpp
+++ b/scene/3d/decal.cpp
@@ -31,7 +31,7 @@
#include "decal.h"
void Decal::set_size(const Vector3 &p_size) {
- size = p_size;
+ size = Vector3(MAX(0.001, p_size.x), MAX(0.001, p_size.y), MAX(0.001, p_size.z));
RS::get_singleton()->decal_set_size(decal, p_size);
update_gizmos();
}
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 829f4cc643..c0ef71ee4f 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -177,6 +177,10 @@ void Label::_shape() {
minsize.width = TS->shaped_text_get_size(lines_rid[i]).x;
}
}
+
+ // With autowrap off, by now we already know the width the label will take.
+ width = (minsize.width - style->get_minimum_size().width);
+ width_stabilized = true;
}
if (lines_dirty && width_stabilized) {
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 663dd586c0..9092be93e6 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -569,6 +569,12 @@ void Window::_update_from_window() {
void Window::_clear_window() {
ERR_FAIL_COND(window_id == DisplayServer::INVALID_WINDOW_ID);
+ DisplayServer::get_singleton()->window_set_rect_changed_callback(Callable(), window_id);
+ DisplayServer::get_singleton()->window_set_window_event_callback(Callable(), window_id);
+ DisplayServer::get_singleton()->window_set_input_event_callback(Callable(), window_id);
+ DisplayServer::get_singleton()->window_set_input_text_callback(Callable(), window_id);
+ DisplayServer::get_singleton()->window_set_drop_files_callback(Callable(), window_id);
+
if (transient_parent && transient_parent->window_id != DisplayServer::INVALID_WINDOW_ID) {
DisplayServer::get_singleton()->window_set_transient(window_id, DisplayServer::INVALID_WINDOW_ID);
}