summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/context_gl_x11.h3
-rw-r--r--platform/x11/detect.py7
-rw-r--r--platform/x11/export/export.cpp3
-rw-r--r--platform/x11/key_mapping_x11.h3
-rw-r--r--platform/x11/os_x11.cpp13
-rw-r--r--platform/x11/os_x11.h3
6 files changed, 15 insertions, 17 deletions
diff --git a/platform/x11/context_gl_x11.h b/platform/x11/context_gl_x11.h
index 46420df48b..095ce2154b 100644
--- a/platform/x11/context_gl_x11.h
+++ b/platform/x11/context_gl_x11.h
@@ -31,9 +31,6 @@
#ifndef CONTEXT_GL_X11_H
#define CONTEXT_GL_X11_H
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
#ifdef X11_ENABLED
#if defined(OPENGL_ENABLED)
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index f3a486df02..b8ff97279d 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -64,6 +64,7 @@ def get_opts():
BoolVariable('use_ubsan', 'Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)', False),
BoolVariable('use_asan', 'Use LLVM/GCC compiler address sanitizer (ASAN))', False),
BoolVariable('use_lsan', 'Use LLVM/GCC compiler leak sanitizer (LSAN))', False),
+ BoolVariable('use_tsan', 'Use LLVM/GCC compiler thread sanitizer (TSAN))', False),
BoolVariable('pulseaudio', 'Detect and use PulseAudio', True),
BoolVariable('udev', 'Use udev for gamepad connection callbacks', False),
EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')),
@@ -140,7 +141,7 @@ def configure(env):
print("Using LLD with GCC is not supported yet, try compiling with 'use_llvm=yes'.")
sys.exit(255)
- if env['use_ubsan'] or env['use_asan'] or env['use_lsan']:
+ if env['use_ubsan'] or env['use_asan'] or env['use_lsan'] or env['use_tsan']:
env.extra_suffix += "s"
if env['use_ubsan']:
@@ -155,6 +156,10 @@ def configure(env):
env.Append(CCFLAGS=['-fsanitize=leak'])
env.Append(LINKFLAGS=['-fsanitize=leak'])
+ if env['use_tsan']:
+ env.Append(CCFLAGS=['-fsanitize=thread'])
+ env.Append(LINKFLAGS=['-fsanitize=thread'])
+
if env['use_lto']:
if not env['use_llvm'] and env.GetOption("num_jobs") > 1:
env.Append(CCFLAGS=['-flto'])
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp
index 8767aac517..6e66173463 100644
--- a/platform/x11/export/export.cpp
+++ b/platform/x11/export/export.cpp
@@ -85,8 +85,7 @@ static Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start,
if (bits == 32 && p_embedded_size >= 0x100000000) {
f->close();
- ERR_EXPLAIN("32-bit executables cannot have embedded data >= 4 GiB");
- ERR_FAIL_V(ERR_INVALID_DATA);
+ ERR_FAIL_V_MSG(ERR_INVALID_DATA, "32-bit executables cannot have embedded data >= 4 GiB.");
}
// Get info about the section header table
diff --git a/platform/x11/key_mapping_x11.h b/platform/x11/key_mapping_x11.h
index 853fe7954a..4e25d6a6ed 100644
--- a/platform/x11/key_mapping_x11.h
+++ b/platform/x11/key_mapping_x11.h
@@ -31,9 +31,6 @@
#ifndef KEY_MAPPING_X11_H
#define KEY_MAPPING_X11_H
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
#include <X11/XF86keysym.h>
#include <X11/Xlib.h>
#define XK_MISCELLANY
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 36bf51e7f9..ca72393e43 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1266,7 +1266,7 @@ Size2 OS_X11::get_min_window_size() const {
void OS_X11::set_min_window_size(const Size2 p_size) {
if ((p_size != Size2()) && (max_size != Size2()) && ((p_size.x > max_size.x) || (p_size.y > max_size.y))) {
- WARN_PRINT("Minimum window size can't be larger than maximum window size!");
+ ERR_PRINT("Minimum window size can't be larger than maximum window size!");
return;
}
min_size = p_size;
@@ -1295,7 +1295,7 @@ void OS_X11::set_min_window_size(const Size2 p_size) {
void OS_X11::set_max_window_size(const Size2 p_size) {
if ((p_size != Size2()) && ((p_size.x < min_size.x) || (p_size.y < min_size.y))) {
- WARN_PRINT("Maximum window size can't be smaller than minimum window size!");
+ ERR_PRINT("Maximum window size can't be smaller than minimum window size!");
return;
}
max_size = p_size;
@@ -1518,9 +1518,12 @@ void OS_X11::set_window_maximized(bool p_enabled) {
XSendEvent(x11_display, DefaultRootWindow(x11_display), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
- if (is_window_maximize_allowed()) {
- while (p_enabled && !is_window_maximized()) {
- // Wait for effective resizing (so the GLX context is too).
+ if (p_enabled && is_window_maximize_allowed()) {
+ // Wait for effective resizing (so the GLX context is too).
+ // Give up after 0.5s, it's not going to happen on this WM.
+ // https://github.com/godotengine/godot/issues/19978
+ for (int attempt = 0; !is_window_maximized() && attempt < 50; attempt++) {
+ usleep(10000);
}
}
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index a4c22cf08a..e6c2effacf 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -77,9 +77,6 @@ typedef struct _xrr_monitor_info {
} xrr_monitor_info;
#undef CursorShape
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
class OS_X11 : public OS_Unix {