summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/SCsub1
-rw-r--r--platform/android/SCsub1
-rw-r--r--platform/android/api/java_class_wrapper.h2
-rw-r--r--platform/ios/SCsub1
-rw-r--r--platform/linuxbsd/SCsub1
-rw-r--r--platform/linuxbsd/wayland/SCsub1
-rw-r--r--platform/linuxbsd/wayland/wayland_thread.h4
-rw-r--r--platform/linuxbsd/x11/SCsub1
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp10
-rw-r--r--platform/macos/SCsub1
-rw-r--r--platform/web/SCsub1
-rw-r--r--platform/windows/SCsub1
-rw-r--r--platform/windows/display_server_windows.cpp4
-rw-r--r--platform/windows/gl_manager_windows_native.cpp4
14 files changed, 19 insertions, 14 deletions
diff --git a/platform/SCsub b/platform/SCsub
index cdaa6074ba..7c9d07f6ef 100644
--- a/platform/SCsub
+++ b/platform/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
from glob import glob
from pathlib import Path
diff --git a/platform/android/SCsub b/platform/android/SCsub
index 8c88b419b3..3bc8959351 100644
--- a/platform/android/SCsub
+++ b/platform/android/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
import subprocess
import sys
diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h
index 52df1644be..71f9c32318 100644
--- a/platform/android/api/java_class_wrapper.h
+++ b/platform/android/api/java_class_wrapper.h
@@ -47,7 +47,7 @@ class JavaClass : public RefCounted {
GDCLASS(JavaClass, RefCounted);
#ifdef ANDROID_ENABLED
- enum ArgumentType{
+ enum ArgumentType {
ARG_TYPE_VOID,
ARG_TYPE_BOOLEAN,
ARG_TYPE_BYTE,
diff --git a/platform/ios/SCsub b/platform/ios/SCsub
index cff7dcc1fd..959a657aac 100644
--- a/platform/ios/SCsub
+++ b/platform/ios/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
Import("env")
diff --git a/platform/linuxbsd/SCsub b/platform/linuxbsd/SCsub
index 0802b528f4..4def765e9c 100644
--- a/platform/linuxbsd/SCsub
+++ b/platform/linuxbsd/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
Import("env")
diff --git a/platform/linuxbsd/wayland/SCsub b/platform/linuxbsd/wayland/SCsub
index 89b586845c..1a8e243728 100644
--- a/platform/linuxbsd/wayland/SCsub
+++ b/platform/linuxbsd/wayland/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
Import("env")
diff --git a/platform/linuxbsd/wayland/wayland_thread.h b/platform/linuxbsd/wayland/wayland_thread.h
index ad2e843a74..819a1205d6 100644
--- a/platform/linuxbsd/wayland/wayland_thread.h
+++ b/platform/linuxbsd/wayland/wayland_thread.h
@@ -665,7 +665,7 @@ private:
.preferred_buffer_transform = _wl_surface_on_preferred_buffer_transform,
};
- static constexpr struct wl_callback_listener frame_wl_callback_listener {
+ static constexpr struct wl_callback_listener frame_wl_callback_listener = {
.done = _frame_wl_callback_on_done,
};
@@ -683,7 +683,7 @@ private:
.name = _wl_seat_on_name,
};
- static constexpr struct wl_callback_listener cursor_frame_callback_listener {
+ static constexpr struct wl_callback_listener cursor_frame_callback_listener = {
.done = _cursor_frame_callback_on_done,
};
diff --git a/platform/linuxbsd/x11/SCsub b/platform/linuxbsd/x11/SCsub
index 75fe584ad5..b76b98447f 100644
--- a/platform/linuxbsd/x11/SCsub
+++ b/platform/linuxbsd/x11/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
Import("env")
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index 7949f80f24..97ea1147ec 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -2998,11 +2998,7 @@ bool DisplayServerX11::window_is_focused(WindowID p_window) const {
const WindowData &wd = windows[p_window];
- Window focused_window;
- int focus_ret_state;
- XGetInputFocus(x11_display, &focused_window, &focus_ret_state);
-
- return wd.x11_window == focused_window;
+ return wd.focused;
}
bool DisplayServerX11::window_can_draw(WindowID p_window) const {
@@ -3050,7 +3046,7 @@ void DisplayServerX11::window_set_ime_active(const bool p_active, WindowID p_win
XWindowAttributes xwa;
XSync(x11_display, False);
XGetWindowAttributes(x11_display, wd.x11_xim_window, &xwa);
- if (xwa.map_state == IsViewable) {
+ if (xwa.map_state == IsViewable && _window_focus_check()) {
_set_input_focus(wd.x11_xim_window, RevertToParent);
}
XSetICFocus(wd.xic);
@@ -4319,7 +4315,7 @@ bool DisplayServerX11::_window_focus_check() {
bool has_focus = false;
for (const KeyValue<int, DisplayServerX11::WindowData> &wid : windows) {
- if (wid.value.x11_window == focused_window) {
+ if (wid.value.x11_window == focused_window || (wid.value.xic && wid.value.ime_active && wid.value.x11_xim_window == focused_window)) {
has_focus = true;
break;
}
diff --git a/platform/macos/SCsub b/platform/macos/SCsub
index a10262c524..3924e79fb6 100644
--- a/platform/macos/SCsub
+++ b/platform/macos/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
Import("env")
diff --git a/platform/web/SCsub b/platform/web/SCsub
index e81f2ec516..b30bf20f26 100644
--- a/platform/web/SCsub
+++ b/platform/web/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
from methods import print_error
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index f8ed8b73f5..1d17e7b325 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from misc.utility.scons_hints import *
Import("env")
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index ed9d5244a3..5b166d0075 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -3962,9 +3962,9 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
}
- // WARNING: we get called with events before the window is registered in our collection
+ // WARNING: We get called with events before the window is registered in our collection
// specifically, even the call to CreateWindowEx already calls here while still on the stack,
- // so there is no way to store the window handle in our collection before we get here
+ // so there is no way to store the window handle in our collection before we get here.
if (!window_created) {
// don't let code below operate on incompletely initialized window objects or missing window_id
return _handle_early_window_message(hWnd, uMsg, wParam, lParam);
diff --git a/platform/windows/gl_manager_windows_native.cpp b/platform/windows/gl_manager_windows_native.cpp
index 8590c46d12..af703f4dfa 100644
--- a/platform/windows/gl_manager_windows_native.cpp
+++ b/platform/windows/gl_manager_windows_native.cpp
@@ -452,8 +452,8 @@ Error GLManagerNative_Windows::window_create(DisplayServer::WindowID p_window_id
return FAILED;
}
- // WARNING: p_window_id is an eternally growing integer since popup windows keep coming and going
- // and each of them has a higher id than the previous, so it must be used in a map not a vector
+ // WARNING: `p_window_id` is an eternally growing integer since popup windows keep coming and going
+ // and each of them has a higher id than the previous, so it must be used in a map not a vector.
_windows[p_window_id] = win;
// make current