Commit Graph

4870 Commits

Author SHA1 Message Date
Doug Binks
375fcdeadb Added GLFW_NO_API check to glfwCreateUserContext and error documentation. 2020-07-16 15:20:25 +01:00
Doug Binks
1d647668af EGL user context code simplification 2020-07-16 14:02:32 +01:00
Doug Binks
cd68bac78d Initial user context documentation 2020-07-16 11:59:23 +01:00
Doug Binks
1cb8ab8dc6 Make user context non current when destroyed 2020-07-16 11:59:11 +01:00
Camilla Löwy
f760b124ca Wayland: Fix scroll offsets being inverted
Scrolling offsets were inverted compared to X11 and Win32.

Fixes #1463.
2020-07-15 23:16:01 +02:00
Camilla Löwy
5f60c22cfa Wayland: Fix partial framebuffer size retrieval 2020-07-15 21:56:52 +02:00
Doug Binks
87ddca831a Removed unused EGL defines. 2020-07-15 19:49:35 +01:00
Doug Binks
2f2e7f041a Simplified fallback pbuffer surface path. 2020-07-15 19:40:00 +01:00
Camilla Löwy
5c92cd9f52 Make windows test a tolerable example 2020-07-15 19:22:30 +02:00
Camilla Löwy
686e18fd72 Remove window opacity test
It has been superceded by the window property test.
2020-07-15 19:08:09 +02:00
Camilla Löwy
3207fc7120 Add window property test 2020-07-15 19:08:04 +02:00
Camilla Löwy
74b9f309a9 Update Nuklear to 4.01.3 2020-07-15 18:02:38 +02:00
Camilla Löwy
a122d91303 Documentation work for GLFW_MOUSE_PASSTHROUGH
Related to #1568.
2020-07-15 18:02:38 +02:00
Camilla Löwy
dfeacee000 Move mouse passthrough before window showing
Related to #1568.
2020-07-15 18:02:38 +02:00
Camilla Löwy
1095a43708 Remove no-op call at window creation
Related to #1568.
2020-07-15 18:02:38 +02:00
Camilla Löwy
6d2003d07a Move management of shared state to shared code
Platform code may not modify shared state.

Related to #1568.
2020-07-15 18:02:38 +02:00
Camilla Löwy
7da3e52c86 Win32: Fix GLFW_MOUSE_PASSTHROUGH dropping events
Returning HTTRANSPARENT from WM_NCHITTEST does cause the window to be
transparent for some hit-testing APIs but does not make it pass mouse
input through to whatever window is below it.

For that to work on modern Windows, the window needs to be both layered
and extended-window-style-transparent.

Additional logic changes to ensure mouse input passthrough, framebuffer
transparency and window opacity are mindful of one another when
modifying WS_EX_LAYERED.

Related to #1568.
2020-07-15 18:00:43 +02:00
Camilla Löwy
68e4261d73 X11: Include X Shape extension headers
Related to #1568.
2020-07-15 18:00:00 +02:00
Camilla Löwy
e81d381256 X11: Fix disabling of GLFW_MOUSE_PASSTHROUGH
The client clip region was left in place when mouse passthrough was
disabled, leading to missing mouse input if the window grew beyond it.

Related to #1568.
2020-07-15 18:00:00 +02:00
Rokas Kupstys
d285a9fdeb Add support for mouse input transparency
This adds the GLFW_MOUSE_PASSTHROUGH window hint and attribute for
controlling whether mouse input passes through the window to whatever
window is behind it.

Fixes #1236.
Closes #1568.
2020-07-15 17:59:55 +02:00
Doug Binks
e55a552eee User context EGL fixes. 2020-07-15 14:31:05 +01:00
Doug Binks
5f52f2a7f8 Fix for ELG wrong surface passed 2020-07-15 13:23:38 +01:00
Doug Binks
3de9ed6453 Fixed EGL glfwMakeUserContextCurrent - requires different surface 2020-07-15 13:21:02 +01:00
Doug Binks
d01ad1a78d Improved usercontext.c test 2020-07-15 13:19:47 +01:00
Doug Binks
f2806aa9ab Added glfwGetCurrentUserContext 2020-07-15 13:19:33 +01:00
Doug Binks
6539d101f3 Added TLS for current user context and simplified code 2020-07-15 13:19:14 +01:00
Doug Binks
a1a1b77150 Added _GLFW_REQUIRE* to user context functions. 2020-07-15 11:19:18 +01:00
Doug Binks
4caca8b20c glfwMakeUserContextCurrent now calls glfwMakeContextCurrent(NULL) to ensure TLS set. 2020-07-15 11:18:58 +01:00
Doug Binks
f2b86a25b3 Cocoa and NSGL Implementation 2020-07-14 19:10:31 +01:00
Doug Binks
dd854e47ba Formatting 2020-07-14 12:38:18 +01:00
Doug Binks
931ba89aad User context null platform and OSMESA implementation. 2020-07-14 11:41:42 +01:00
Doug Binks
51f11929f3 User context Wayland and EGL implementations 2020-07-13 19:05:36 +01:00
Camilla Löwy
6c031af245 Null: Fix typos in workarea retrieval 2020-07-13 19:43:13 +02:00
Doug Binks
5e94092263 Refactor user context implementation to use the standard GLFW platform / context approach 2020-07-13 18:06:48 +01:00
Doug Binks
3a0a3c540c Merge branch 'master' into multi-context-windows 2020-07-13 11:04:23 +01:00
Doug Binks
998036654c GLX user context implementation 2020-07-13 10:50:06 +01:00
Doug Binks
0ae4eb4d26 Improved User Context Win32 implementation
_glfwCreateContextWGL and _glfwPlatformCreateUserContext now use  new function _glfwCreateContextForDCWGL.
2020-07-12 12:21:18 +01:00
Camilla Löwy
49dbcfcb8c X11: Fix cursor hover query retry behavior
XQueryPointer returns zero on BadWindow so the retry did not happen.

Related to ceb20c7f97.
2020-07-10 00:05:09 +02:00
Camilla Löwy
ceb20c7f97 X11: Fix race in window hovered query
The window decoration window can go away between calls to XQueryPointer,
for example if the GLFW_DECORATED window attribute was just cleared.
2020-07-09 22:36:59 +02:00
Camilla Löwy
4ae93e0547 X11: Remove non-UTF-8 fallback paths
It seems it has not been possible to compile GLFW on systems without the
UTF-8 extensions to Xlib since a0a5cc57df
was merged five months ago.  The UTF-8 extension functions were
introduced with XFree86 4.0.2 in December 2000 and are likely widely
available at this point.

This removes the locale-dependent fallback paths and uses the UTF-8
extension functions where available.
2020-07-02 21:38:40 +02:00
Camilla Löwy
9a3664b4a9 X11: Fix detection of key events duplicated by XIM
Background: The IM will filter out key events, instead sending exact
duplicate events that are not filtered.  It does not send these for
every event, however, so the duplicate events cannot be relied on for
key input.  Instead we need to identify and discard them.  Since they
are identical, they have the same timestamp as the originals.

The previous duplicate event detection would consume unrelated key
events if the keys were pressed simultaneously, as it only tracked
a single timestamp.

This fixes that issue for any combination of keys, at the expense of
a 1 KB array per GLFW window.

This fix is a stopgap until explicit IME support is done.

Based on #1472 by @LucaRood.

Fixes #1112.
Fixes #1415.
Fixes #1616.
Fixes #1663.
Closes #1472.
2020-07-02 21:38:03 +02:00
Camilla Löwy
6ce2070392 Win32: Fix non-BMP Unicode codepoint input
Supplementary Plane codepoints from WM_CHAR and WM_SYSCHAR messages were
reported as UTF-16 surrogate pairs.

Related to #1635.
2020-06-29 23:50:05 +02:00
Camilla Löwy
e47832ffcf Cocoa: Fix regression in private use area check
This fixes a regression introduced by
ad9eb768c9.
2020-06-29 23:23:26 +02:00
Camilla Löwy
ad9eb768c9 Cocoa: Fix non-BMP Unicode codepoint input
Supplimentary Plane codepoints were reported as UTF-16 surrogate pairs.

Fixes #1635.
2020-06-29 23:03:24 +02:00
Camilla Löwy
854ce1db4e Fix format of change log entry 2020-06-29 21:14:29 +02:00
Camilla Löwy
f5f060e6bf Init hint documentation work
The documentation for window hints had several features that had not
been carried over to init hints.

This also removes listing glfwInitHint for each hint, which was an
artifact of the removal of glfwInitHintString.
2020-06-29 00:02:41 +02:00
Camilla Löwy
0dea8a4441 EGL: Add support for EGL_ANGLE_platform_angle
This adds basic support for selecting the platform type (rendering
backend) when running on ANGLE.

Related to #1380.
2020-06-29 00:02:22 +02:00
Camilla Löwy
e6a6a99813 Use stdbool more consistently in glfwinfo 2020-06-28 21:23:29 +02:00
Camilla Löwy
1cecb8beb0 Move glfwinfo argument processing before glfwInit
This will allow init hints to be controlled by command-line arguments.
2020-06-28 21:23:29 +02:00
Camilla Löwy
36f8250321 Add missing entries to new symbols list
Related to #1692.
2020-06-28 19:27:49 +02:00