summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/Container.xml10
-rw-r--r--scene/gui/container.cpp6
-rw-r--r--scene/gui/container.h3
-rw-r--r--scene/resources/packed_scene.cpp2
-rw-r--r--scene/scene_string_names.cpp1
-rw-r--r--scene/scene_string_names.h1
-rw-r--r--thirdparty/README.md2
-rw-r--r--thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp6
-rw-r--r--thirdparty/bullet/patches/fix-win32-scheduler-uwp.patch24
9 files changed, 51 insertions, 4 deletions
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index e78eb8d259..24e73534d3 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -29,6 +29,11 @@
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
</members>
<signals>
+ <signal name="pre_sort_children">
+ <description>
+ Emitted when children are going to be sorted.
+ </description>
+ </signal>
<signal name="sort_children">
<description>
Emitted when sorting the children is needed.
@@ -36,7 +41,10 @@
</signal>
</signals>
<constants>
- <constant name="NOTIFICATION_SORT_CHILDREN" value="50">
+ <constant name="NOTIFICATION_PRE_SORT_CHILDREN" value="50">
+ Notification just before children are going to be sorted, in case there's something to process beforehand.
+ </constant>
+ <constant name="NOTIFICATION_SORT_CHILDREN" value="51">
Notification for when sorting the children, it must be obeyed immediately.
</constant>
</constants>
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index 11941529cd..a1bd82f6f7 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -87,6 +87,9 @@ void Container::_sort_children() {
return;
}
+ notification(NOTIFICATION_PRE_SORT_CHILDREN);
+ emit_signal(SceneStringNames::get_singleton()->pre_sort_children);
+
notification(NOTIFICATION_SORT_CHILDREN);
emit_signal(SceneStringNames::get_singleton()->sort_children);
pending_sort = false;
@@ -174,7 +177,10 @@ void Container::_bind_methods() {
ClassDB::bind_method(D_METHOD("queue_sort"), &Container::queue_sort);
ClassDB::bind_method(D_METHOD("fit_child_in_rect", "child", "rect"), &Container::fit_child_in_rect);
+ BIND_CONSTANT(NOTIFICATION_PRE_SORT_CHILDREN);
BIND_CONSTANT(NOTIFICATION_SORT_CHILDREN);
+
+ ADD_SIGNAL(MethodInfo("pre_sort_children"));
ADD_SIGNAL(MethodInfo("sort_children"));
}
diff --git a/scene/gui/container.h b/scene/gui/container.h
index bce3085f0c..f3ae948556 100644
--- a/scene/gui/container.h
+++ b/scene/gui/container.h
@@ -51,7 +51,8 @@ protected:
public:
enum {
- NOTIFICATION_SORT_CHILDREN = 50
+ NOTIFICATION_PRE_SORT_CHILDREN = 50,
+ NOTIFICATION_SORT_CHILDREN = 51,
};
void fit_child_in_rect(Control *p_child, const Rect2 &p_rect);
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index c8d3ea5e37..60cda637ca 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -388,7 +388,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
editable_instances.push_back(p_owner->get_path_to(p_node));
// Node is the root of an editable instance.
is_editable_instance = true;
- } else if (p_node->get_owner() && p_node->get_owner() != p_owner && p_owner->is_editable_instance(p_node->get_owner())) {
+ } else if (p_node->get_owner() && p_owner->is_ancestor_of(p_node->get_owner()) && p_owner->is_editable_instance(p_node->get_owner())) {
// Node is part of an editable instance.
is_editable_instance = true;
}
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index b283749ffa..29e5dd6056 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -73,6 +73,7 @@ SceneStringNames::SceneStringNames() {
focus_entered = StaticCString::create("focus_entered");
focus_exited = StaticCString::create("focus_exited");
+ pre_sort_children = StaticCString::create("pre_sort_children");
sort_children = StaticCString::create("sort_children");
body_shape_entered = StaticCString::create("body_shape_entered");
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index 2923351eab..5e3195952e 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -89,6 +89,7 @@ public:
StringName focus_entered;
StringName focus_exited;
+ StringName pre_sort_children;
StringName sort_children;
StringName finished;
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 23380b6413..e7ceea6268 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -28,7 +28,7 @@ Files extracted from upstream source:
- `src/*` apart from CMakeLists.txt and premake4.lua files
- `LICENSE.txt`, and `VERSION` as `VERSION.txt`
-Includes a warning fix which should be upstreamed soon (see patch in `patches`).
+Includes some patches in the `patches` folder which have been sent upstream.
## certs
diff --git a/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp b/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
index 922e449cce..5862264a67 100644
--- a/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
+++ b/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
@@ -82,6 +82,11 @@ typedef BOOL(WINAPI* Pfn_GetLogicalProcessorInformation)(PSYSTEM_LOGICAL_PROCESS
void getProcessorInformation(btProcessorInfo* procInfo)
{
memset(procInfo, 0, sizeof(*procInfo));
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ // Can't dlopen libraries on UWP.
+ return;
+#else
Pfn_GetLogicalProcessorInformation getLogicalProcInfo =
(Pfn_GetLogicalProcessorInformation)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "GetLogicalProcessorInformation");
if (getLogicalProcInfo == NULL)
@@ -160,6 +165,7 @@ void getProcessorInformation(btProcessorInfo* procInfo)
}
}
free(buf);
+#endif
}
///btThreadSupportWin32 helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
diff --git a/thirdparty/bullet/patches/fix-win32-scheduler-uwp.patch b/thirdparty/bullet/patches/fix-win32-scheduler-uwp.patch
new file mode 100644
index 0000000000..c65db49388
--- /dev/null
+++ b/thirdparty/bullet/patches/fix-win32-scheduler-uwp.patch
@@ -0,0 +1,24 @@
+diff --git a/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp b/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
+index 922e449cce..5862264a67 100644
+--- a/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
++++ b/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
+@@ -82,6 +82,11 @@ typedef BOOL(WINAPI* Pfn_GetLogicalProcessorInformation)(PSYSTEM_LOGICAL_PROCESS
+ void getProcessorInformation(btProcessorInfo* procInfo)
+ {
+ memset(procInfo, 0, sizeof(*procInfo));
++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
++ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
++ // Can't dlopen libraries on UWP.
++ return;
++#else
+ Pfn_GetLogicalProcessorInformation getLogicalProcInfo =
+ (Pfn_GetLogicalProcessorInformation)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "GetLogicalProcessorInformation");
+ if (getLogicalProcInfo == NULL)
+@@ -160,6 +165,7 @@ void getProcessorInformation(btProcessorInfo* procInfo)
+ }
+ }
+ free(buf);
++#endif
+ }
+
+ ///btThreadSupportWin32 helps to initialize/shutdown libspe2, start/stop SPU tasks and communication