summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/variant_call.cpp8
-rw-r--r--doc/classes/Transform.xml4
-rw-r--r--doc/classes/Transform2D.xml16
-rw-r--r--platform/x11/os_x11.cpp40
-rw-r--r--version.py4
5 files changed, 45 insertions, 27 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index e9f7af3f63..2ca435611b 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -1748,10 +1748,10 @@ void register_variant_methods() {
ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, REAL, "phi", varray());
ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, scaled, VECTOR2, "scale", varray());
ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, translated, VECTOR2, "offset", varray());
- ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, xform, NIL, "v", varray());
- ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, xform_inv, NIL, "v", varray());
- ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, basis_xform, NIL, "v", varray());
- ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, basis_xform_inv, NIL, "v", varray());
+ ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform, NIL, "v", varray());
+ ADDFUNC1R(TRANSFORM2D, NIL, Transform2D, xform_inv, NIL, "v", varray());
+ ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform, VECTOR2, "v", varray());
+ ADDFUNC1R(TRANSFORM2D, VECTOR2, Transform2D, basis_xform_inv, VECTOR2, "v", varray());
ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", REAL, "weight", varray());
ADDFUNC0R(BASIS, BASIS, Basis, inverse, varray());
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index c893903b4f..cf1c9ea032 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -143,7 +143,7 @@
<argument index="0" name="v" type="var">
</argument>
<description>
- Transforms the given vector "v" by this transform.
+ Transforms the given [Vector3], [Plane], or [AABB] by this transform.
</description>
</method>
<method name="xform_inv">
@@ -152,7 +152,7 @@
<argument index="0" name="v" type="var">
</argument>
<description>
- Inverse-transforms the given vector "v" by this transform.
+ Inverse-transforms the given [Vector3], [Plane], or [AABB] by this transform.
</description>
</method>
</methods>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 2a7a8bd97d..e20f48ba14 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -52,18 +52,18 @@
</description>
</method>
<method name="basis_xform">
- <return type="Transform2D">
+ <return type="Vector2">
</return>
- <argument index="0" name="v" type="var">
+ <argument index="0" name="v" type="Vector2">
</argument>
<description>
Transforms the given vector by this transform's basis (no translation).
</description>
</method>
<method name="basis_xform_inv">
- <return type="Transform2D">
+ <return type="Vector2">
</return>
- <argument index="0" name="v" type="var">
+ <argument index="0" name="v" type="Vector2">
</argument>
<description>
Inverse-transforms the given vector by this transform's basis (no translation).
@@ -143,21 +143,21 @@
</description>
</method>
<method name="xform">
- <return type="Transform2D">
+ <return type="var">
</return>
<argument index="0" name="v" type="var">
</argument>
<description>
- Transforms the given vector "v" by this transform.
+ Transforms the given [Vector2] or [Rect2] by this transform.
</description>
</method>
<method name="xform_inv">
- <return type="Transform2D">
+ <return type="var">
</return>
<argument index="0" name="v" type="var">
</argument>
<description>
- Inverse-transforms the given vector "v" by this transform.
+ Inverse-transforms the given [Vector2] or [Rect2] by this transform.
</description>
</method>
</methods>
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 7a2cbf26bc..eaf72d4dbf 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1862,8 +1862,12 @@ void OS_X11::process_xevents() {
e = event;
req = &(e.xselectionrequest);
- if (req->target == XA_STRING || req->target == XInternAtom(x11_display, "COMPOUND_TEXT", 0) ||
- req->target == XInternAtom(x11_display, "UTF8_STRING", 0)) {
+ if (req->target == XInternAtom(x11_display, "UTF8_STRING", 0) ||
+ req->target == XInternAtom(x11_display, "COMPOUND_TEXT", 0) ||
+ req->target == XInternAtom(x11_display, "TEXT", 0) ||
+ req->target == XA_STRING ||
+ req->target == XInternAtom(x11_display, "text/plain;charset=utf-8", 0) ||
+ req->target == XInternAtom(x11_display, "text/plain", 0)) {
CharString clip = OS::get_clipboard().utf8();
XChangeProperty(x11_display,
req->requestor,
@@ -1876,26 +1880,40 @@ void OS_X11::process_xevents() {
respond.xselection.property = req->property;
} else if (req->target == XInternAtom(x11_display, "TARGETS", 0)) {
- Atom data[2];
- data[0] = XInternAtom(x11_display, "UTF8_STRING", 0);
- data[1] = XA_STRING;
- XChangeProperty(x11_display, req->requestor, req->property, req->target,
- 8, PropModeReplace, (unsigned char *)&data,
- sizeof(data));
+ Atom data[7];
+ data[0] = XInternAtom(x11_display, "TARGETS", 0);
+ data[1] = XInternAtom(x11_display, "UTF8_STRING", 0);
+ data[2] = XInternAtom(x11_display, "COMPOUND_TEXT", 0);
+ data[3] = XInternAtom(x11_display, "TEXT", 0);
+ data[4] = XA_STRING;
+ data[5] = XInternAtom(x11_display, "text/plain;charset=utf-8", 0);
+ data[6] = XInternAtom(x11_display, "text/plain", 0);
+
+ XChangeProperty(x11_display,
+ req->requestor,
+ req->property,
+ XA_ATOM,
+ 32,
+ PropModeReplace,
+ (unsigned char *)&data,
+ sizeof(data) / sizeof(data[0]));
respond.xselection.property = req->property;
} else {
- printf("No String %x\n",
- (int)req->target);
+ char *targetname = XGetAtomName(x11_display, req->target);
+ printf("No Target '%s'\n", targetname);
+ if (targetname)
+ XFree(targetname);
respond.xselection.property = None;
}
+
respond.xselection.type = SelectionNotify;
respond.xselection.display = req->display;
respond.xselection.requestor = req->requestor;
respond.xselection.selection = req->selection;
respond.xselection.target = req->target;
respond.xselection.time = req->time;
- XSendEvent(x11_display, req->requestor, 0, 0, &respond);
+ XSendEvent(x11_display, req->requestor, True, NoEventMask, &respond);
XFlush(x11_display);
} break;
diff --git a/version.py b/version.py
index 4e502bc318..0eff47acdc 100644
--- a/version.py
+++ b/version.py
@@ -1,6 +1,6 @@
short_name = "godot"
name = "Godot Engine"
major = 3
-minor = 0
-status = "rc3"
+minor = 1
+status = "dev"
module_config = ""