Skip to content

Commit eca7eba

Browse files
authored
Desktop IME overhaul: GLFW 3.5 integration, cross-platform IME state control, and fullscreen/input stability fixes
- Upgrade bundled GLFW integration to newer Axmol GLFW fork content, including platform/input backend updates and Wayland text-input protocol definitions used for IME behavior. - Improve desktop IME lifecycle handling through RenderViewImpl, including IME on/off control and preedit cursor rectangle updates. - Add a defensive guard to skip IME input-mode calls when the main GLFW window handle is null (safe behavior during/after teardown). - Add key-state query support in RenderViewImpl (isKeyPressed) to support desktop shortcut handling. - Ensure text-field IME attach/detach paths properly drive IME open/close behavior on desktop platforms. - Add Alt+Enter fullscreen hotkey support in cpp-tests
1 parent 0470e5d commit eca7eba

77 files changed

Lines changed: 5232 additions & 1532 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3rdparty/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@
8181

8282
## glfw
8383
- [![Upstream](https://img.shields.io/github/v/release/glfw/glfw?label=Upstream)](https://github.com/glfw/glfw)
84-
- Version: 3.4, with modified for create as win32 child window support
84+
- Version: 3.5-2f3efb7 of https://github.com/axmolengine/glfw
8585
- License: zlib
8686

8787
## ghc (iOS < 13 ONLY)
8888
- [![Upstream](https://img.shields.io/github/v/release/gulrak/filesystem?label=Upstream)](https://github.com/gulrak/filesystem)
8989
- Version: 1.5.14
9090
- License: MIT
9191

92-
## jni.hpp
92+
## jni.hpps
9393
- [![Upstream](https://img.shields.io/github/v/release/mapbox/jni.hpp?label=Upstream)](https://github.com/mapbox/jni.hpp)
9494
- Version: v4.0.0
9595
- License: MIT-like

3rdparty/glfw/CMake/GenerateMappings.cmake

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Usage:
22
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>
33

4+
cmake_policy(VERSION 3.16)
5+
46
set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
57
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
68
set(template_path "${CMAKE_ARGV3}")
@@ -22,24 +24,24 @@ if (status_code)
2224
endif()
2325

2426
file(STRINGS "${source_path}" lines)
25-
foreach(line ${lines})
26-
if (line MATCHES "^[0-9a-fA-F]")
27-
if (line MATCHES "platform:Windows")
28-
if (GLFW_WIN32_MAPPINGS)
29-
string(APPEND GLFW_WIN32_MAPPINGS "\n")
30-
endif()
31-
string(APPEND GLFW_WIN32_MAPPINGS "\"${line}\",")
32-
elseif (line MATCHES "platform:Mac OS X")
33-
if (GLFW_COCOA_MAPPINGS)
34-
string(APPEND GLFW_COCOA_MAPPINGS "\n")
35-
endif()
36-
string(APPEND GLFW_COCOA_MAPPINGS "\"${line}\",")
37-
elseif (line MATCHES "platform:Linux")
38-
if (GLFW_LINUX_MAPPINGS)
39-
string(APPEND GLFW_LINUX_MAPPINGS "\n")
40-
endif()
41-
string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",")
27+
list(FILTER lines INCLUDE REGEX "^[0-9a-fA-F]")
28+
29+
foreach(line IN LISTS lines)
30+
if (line MATCHES "platform:Windows")
31+
if (GLFW_WIN32_MAPPINGS)
32+
string(APPEND GLFW_WIN32_MAPPINGS "\n")
33+
endif()
34+
string(APPEND GLFW_WIN32_MAPPINGS "\"${line}\",")
35+
elseif (line MATCHES "platform:Mac OS X")
36+
if (GLFW_COCOA_MAPPINGS)
37+
string(APPEND GLFW_COCOA_MAPPINGS "\n")
38+
endif()
39+
string(APPEND GLFW_COCOA_MAPPINGS "\"${line}\",")
40+
elseif (line MATCHES "platform:Linux")
41+
if (GLFW_LINUX_MAPPINGS)
42+
string(APPEND GLFW_LINUX_MAPPINGS "\n")
4243
endif()
44+
string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",")
4345
endif()
4446
endforeach()
4547

3rdparty/glfw/CMake/modules/FindOSMesa.cmake

Lines changed: 0 additions & 18 deletions
This file was deleted.

3rdparty/glfw/CMakeLists.txt

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
cmake_minimum_required(VERSION 3.4...3.28 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.16...3.28 FATAL_ERROR)
22

3-
project(GLFW VERSION 3.4.0 LANGUAGES C)
4-
5-
if (POLICY CMP0069)
6-
cmake_policy(SET CMP0069 NEW)
7-
endif()
8-
9-
if (POLICY CMP0077)
10-
cmake_policy(SET CMP0077 NEW)
11-
endif()
3+
project(GLFW VERSION 3.5.0 LANGUAGES C HOMEPAGE_URL "https://www.glfw.org/")
124

135
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
146

@@ -46,11 +38,7 @@ set(GLFW_LIBRARY_TYPE "${GLFW_LIBRARY_TYPE}" CACHE STRING
4638
"Library type override for GLFW (SHARED, STATIC, OBJECT, or empty to follow BUILD_SHARED_LIBS)")
4739

4840
if (GLFW_LIBRARY_TYPE)
49-
if (GLFW_LIBRARY_TYPE STREQUAL "SHARED")
50-
set(GLFW_BUILD_SHARED_LIBRARY TRUE)
51-
else()
52-
set(GLFW_BUILD_SHARED_LIBRARY FALSE)
53-
endif()
41+
string(COMPARE EQUAL "${GLFW_LIBRARY_TYPE}" "SHARED" GLFW_BUILD_SHARED_LIBRARY)
5442
else()
5543
set(GLFW_BUILD_SHARED_LIBRARY ${BUILD_SHARED_LIBS})
5644
endif()
@@ -80,24 +68,7 @@ endif()
8068
# This is here because it also applies to tests and examples
8169
#--------------------------------------------------------------------
8270
if (MSVC AND NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
83-
if (CMAKE_VERSION VERSION_LESS 3.15)
84-
foreach (flag CMAKE_C_FLAGS
85-
CMAKE_C_FLAGS_DEBUG
86-
CMAKE_C_FLAGS_RELEASE
87-
CMAKE_C_FLAGS_MINSIZEREL
88-
CMAKE_C_FLAGS_RELWITHDEBINFO)
89-
90-
if (flag MATCHES "/MD")
91-
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
92-
endif()
93-
if (flag MATCHES "/MDd")
94-
string(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}")
95-
endif()
96-
97-
endforeach()
98-
else()
99-
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
100-
endif()
71+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
10172
endif()
10273

10374
#--------------------------------------------------------------------

0 commit comments

Comments
 (0)