Takuro Ashie
a5a3cbe5c0
X11: Fix coding style
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
3ad6cd187d
X11: Fix transplanting oversight
...
There was a oversight in transplanting shibukawa's fix:
* https://github.com/glfw/glfw/pull/658
* d36a164423
This made preedit callbacks not being called.
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
20cc0fa21c
tests: Add original author's copyright and reference to shibukawa's fix
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
e7a1099a7b
tests: Fix coding style
...
* brace position
* length of one line
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
0d8627121c
Add IME test code
...
This fix is based on `tests/ime.c` of shibukawa's fix:
https://github.com/glfw/glfw/pull/658
d36a164423
I simplified and restructured it entirely.
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
e2e88ef8aa
Fix shibukawa's fix of tests/events
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
3386299e1f
Apply shibukawa's fix of tests/events
...
This fix is based on shibukawa's fix:
https://github.com/glfw/glfw/pull/658
d36a164423
This code doesn't work because `get_character_string` is undefined.
We need further work.
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
59e192be6d
Win32: Use dynamic load for imm32
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
15a64185b0
Win32: Rename commit function
...
The data to commit is a result-string rather than preedit.
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
4cdabc29f2
Win32: Add preedit commit logic
...
Make committed preedit data output to `character` callback,
which is set at `glfwSetCharCallback`.
2022-05-24 14:14:57 +09:00
Takuro Ashie
853b68fed7
Fix docs concerned with input methods to follow others
...
the function signature ->
the function pointer type
2022-05-24 14:14:57 +09:00
Takuro Ashie
9b22e781ca
Win32: Remove needless cast
2022-05-24 14:14:57 +09:00
Takuro Ashie
b9223f114d
Win32: Plug potential memory leaks
2022-05-24 14:14:57 +09:00
Takuro Ashie
3e99fcc865
Win32: Cosmetic changes
...
* Remove a needless local variable
* Shorten long lines
2022-05-24 14:14:57 +09:00
Takuro Ashie
4fd32183f8
Win32: Extract retrieving preedit text as a function
2022-05-24 14:14:57 +09:00
Takuro Ashie
3a4d7eb85a
Win32: Use ImmGetCompositionStringW() explicitly
...
ImmGetCompositionString() is ambiguous.
2022-05-24 14:14:57 +09:00
Takuro Ashie
599a1a98ec
Win32: Fix style
...
* Remove needless braces
* Add spaces
* Use C89 style variable declarations
2022-05-24 14:14:57 +09:00
Takuro Ashie
169da05c53
Fix too long buffer for ImmGetCompositionStringW()
...
It return's byte size, not string length. So that multiplying by
sizeof(WCHAR) isn't needed.
2022-05-24 14:14:57 +09:00
Daijiro Fukuda
ffce1503cc
Apply sibukawa's fix of GLFW for MacOS
...
This fix is based on shibukawa's fix:
https://github.com/glfw/glfw/pull/658
d36a164423
2022-05-24 14:14:57 +09:00
Takuro Ashie
8a02ec2702
X11: Revive inputContextDestroyCallback()
...
XCreateIC() has vararg so that both XNStatusAttributes and
XNDestroyCallback are acceptable.
2022-05-24 14:14:57 +09:00
Takuro Ashie
2130afeb02
Win32: Fix coding style
...
* brace position
* add missing spaces
2022-05-24 14:14:57 +09:00
Takuro Ashie
e4c4c7343c
Win32: Plug potential memory leaks
2022-05-24 14:14:57 +09:00
Takuro Ashie
d97e954aa3
Win32: Link imm32 on building examples and tests
2022-05-24 14:14:57 +09:00
Takuro Ashie
d808d1d274
Load missing XIM related function symbols
...
* XSetICValues
* XVaCreateNestedList
* XmbResetIC
2022-05-24 14:14:57 +09:00
daipom
a2c18d6c2f
Apply shibukawa's fix of GLFW for X11
...
This fix is based on shibukawa's fix:
https://github.com/glfw/glfw/pull/658
The differences is the following.
* Remove `X_HAVE_UTF8_STRING` branching since the current logic doesn't use it
* Replace `XNDestroyCallback` for `XNPreeditAttributes` in `XCreateIC`
2022-05-24 14:14:57 +09:00
daipom
fad44068e5
Apply shibukawa's fix of GLFW for Windows
...
This fix is based on shibukawa's fix:
https://github.com/glfw/glfw/pull/658
d36a164423
Some minor coding style changes are made, but not yet follow glfw's one,
and some comments doesn't follow recent changes. So further work is
needed.
2022-05-24 14:14:57 +09:00
Camilla Löwy
62e175ef9f
Win32: Add comment clarifying use of ToUnicode
...
Fixes #2100
2022-05-06 19:19:25 +02:00
Camilla Löwy
ce85c7dcaf
Fix GLAPIENTRY not being defined for native access
...
This is a follow-up to 535c3ce632
.
That commit made glfw3native.h undefine GLAPIENTRY whenever
GLFW_EXPOSE_NATIVE_GLX or GLFW_EXPOSE_NATIVE_OSMESA was defined, on the
assumption that it was glfw3.h that had defined GLAPIENTRY.
If gl.h or an extension loader header has been included before glfw3.h,
then it has defined inclusion guards preventing GLAPIENTRY from being
defined later when the GLX or OSMesa header includes gl.h.
This commit ensures GLAPIENTRY is only undefined if glfw3.h defined it.
Related to #2010
2022-05-06 19:18:47 +02:00
Camilla Löwy
5c3ebfb9cc
Remove OSMesa specific code from offscreen example
...
The OSMesa specific path is more appropriate for a test than an example.
2022-05-06 19:06:13 +02:00
Camilla Löwy
7dfd84c458
Win32: Make monitor area retrieval more consistent
...
The rest of this file uses GetMonitorInfoW to retrieve this information.
2022-04-28 21:58:44 +02:00
Camilla Löwy
685de9089f
Fix and clarify comments for GLFWAPI
2022-04-28 21:58:44 +02:00
Camilla Löwy
09653b8c54
Move last bits of window setup to platform code
...
This avoids glfwCreateWindow emitting GLFW_FEATURE_UNAVAILABLE or
GLFW_FEATURE_UNIMPLEMENTED on Wayland because shared code was calling
unimplemented or unavailable platform functions during final setup.
It also makes it consistent with the final setup of full screen windows.
2022-04-28 21:58:06 +02:00
Camilla Löwy
72642ea0d1
Simplify struct stitching for sync primitives
...
There will not currently be more than one set of threading or timer APIs
selected regardless of how many window systems are enabled, so there is
no need for this extra complexity.
2022-04-28 21:54:25 +02:00
Camilla Löwy
8f050b5655
Wayland: Add support for older wayland-scanner
...
Versions of wayland-scanner prior to 1.17.91 named every global array of
wl_interface pointers 'types', making it impossible to combine several
unmodified private-code files into a single compilation unit.
This overrides that name with a macro for each file, allowing them to
coexist.
Fixes #2016
Closes #2032
2022-04-28 21:54:24 +02:00
Camilla Löwy
acf0c10e7a
Win32: Fix message reported by VS 2022
2022-04-28 21:54:24 +02:00
Camilla Löwy
80e31ce9e1
Win32: Remove superfluous cast
2022-04-28 21:54:24 +02:00
Camilla Löwy
d3c2121221
Move CODEOWNERS to .github directory
...
This slightly de-clutters a directory mostly intended for human-readable
documentation.
2022-04-28 21:19:10 +02:00
Camilla Löwy
23e6e8e4b7
X11: Fix segfault on malformed INCR response
...
The code assumed that at least some data would be received via the INCR
mechanism and that, as a result, the string buffer would be allocated.
Bug found by Clang static analysis.
2022-04-28 21:19:08 +02:00
Camilla Löwy
f60547ac80
X11: Fix returned clipboard string freed too early
...
The clipboard string should not be freed on SelectionClear. The user
may have received it from glfwGetClipboardString and it should remain
valid until the next call to a public clipboard string function.
2022-04-28 21:18:49 +02:00
Camilla Löwy
06089a91a6
Document delayed initialization of EGL display
2022-04-28 21:18:49 +02:00
Camilla Löwy
82ccbb3ef0
Update stb_image_write.h to version 1.16
2022-04-28 21:18:49 +02:00
Camilla Löwy
a8d8b760fb
X11: Fix OSMesa library not being unloaded
2022-04-28 21:17:39 +02:00
Camilla Löwy
2d281d7928
Wayland: Fix OSMesa library not being unloaded
2022-04-28 21:16:06 +02:00
Camilla Löwy
89514cf0fc
Cocoa: Fix EGL and OSMesa not being unloaded
2022-04-28 21:14:11 +02:00
Camilla Löwy
10e9033a29
Win32: Fix OSMesa library not being unloaded
2022-04-28 21:12:36 +02:00
Camilla Löwy
29523dbfbf
Fix order of error checks in glfwSetGammaRamp
...
Initialization should be checked before arguments.
2022-04-21 15:57:15 +02:00
Camilla Löwy
f843d53333
Fix glfwMakeContextCurrent using uninitialized TLS
...
Issue reported by danhambleton on the GLFW forum:
https://discourse.glfw.org/t/posix-thread-local-storage-tls-error-when-making-context-current/2034
2022-04-21 15:56:01 +02:00
Camilla Löwy
4cb36872a5
Wayland: Add support for file drop events
...
This adds support for file path drop events in text/uri-list format.
It is based on work by Pilzschaf in #2040 .
Closes #2040
2022-04-03 20:09:42 +02:00
Camilla Löwy
0f38382e25
Wayland: Clean up listener struct initialization
...
Adapt style to match the rest of the project.
2022-04-03 20:09:42 +02:00
Camilla Löwy
f010335b8c
Wayland: Make data offer reading a generic utility
...
This will be needed for drag and drop reception as well.
2022-04-03 20:09:42 +02:00