Commit Graph

665 Commits

Author SHA1 Message Date
Camilla Löwy
58b48a3a00 Win32: Remove changing the foreground lock timeout
It's rude to ignore the foreground lock timeout, especially by default.

Discussion of this code and its removal:
https://discourse.glfw.org/t/why-is-spi-setforegroundlocktimeout-set-to-zero-on-glfwinit-win32
2021-08-12 20:50:30 +02:00
Camilla Löwy
ab34cc51c6 Update changelog
Related to #1840.
2021-07-29 21:27:02 +02:00
Camilla Löwy
076bfd55be Cocoa: Fix MoltenVK layer scale out of sync
The contents scale of the hosted CAMetalLayer created for MoltenVK was
updated only after the GLFW content scale and framebuffer size events
were emitted, causing the layer to get out of sync with the monitor the
window was on.
2021-07-16 20:10:19 +02:00
Camilla Löwy
b6f7ead3c5 Add credit
Related to #1931.
2021-07-14 17:57:08 +02:00
Camilla Löwy
6876cf8d7e Remove errors for gamepad element mismatch
Because there are controllers in the wild using the same hardware ID
despite having different numbers of buttons and axes, an error message
was triggered that was only expected for a corrupted mapping database.

This removes the error for now, in preparation for better error handling
for gamepad mappings overall.

Fixes #1763.
2021-06-25 20:19:40 +02:00
Camilla Löwy
6f7c61c6b3 Add missing changelog entry
Related to #1843.
2021-06-15 18:15:13 +02:00
Camilla Löwy
787295b3af Fix some documentation URLs still using http:
Some URLs in the documentation were overlooked during the switch to
https: for the GLFW website.  This updates those and a few third-party
URLs.
2021-06-14 19:50:32 +02:00
Camilla Löwy
78380c7761 Update IRC network to Libera.Chat
The `#glfw` IRC channel is moving to the Libera.Chat network due to the
recent takeover of the Freenode network.
2021-06-14 19:50:32 +02:00
Camilla Löwy
5a6001a83b Migrate from Travis CI to GitHub Actions
The old Travis CI .org service has been throttled for a while now and is
said to be shutting down completely next week.

This migrates the Travis CI build jobs to GitHub Actions, with minor
changes.

- The trailing whitespace detection has been removed for now.
- The libegl1-mesa-dev dependency for Wayland has been removed as it
  appears to no longer be necessary for building.
2021-06-14 19:45:47 +02:00
Camilla Löwy
184377b493 Skip initial buffer swap when single-buffered
This skips the buffer swap after the initial glClear performed during
window creation, if the window is single-buffered.  This call confused
apitrace into thinking the window was double-buffered.

Fixes #1873.
2021-05-14 19:02:25 +02:00
Camilla Löwy
04f21abb52 Make GLFW_DOUBLEBUFFER a window attribute 2021-05-14 19:02:25 +02:00
Camilla Löwy
0e9ec7788b Fix description of video mode ordering in docs
The two final sorting criteria were not included in the documentation.

Fixes #1889.
2021-04-22 23:09:44 +02:00
Camilla Löwy
061a0263a9 Win32: Fix compilation with standalone LLVM
The /clang: suffix passed to Clang-CL was accidentally also passed to
the regular standalone Clang, which caused compilation to fail.  We now
pass /W3 to Clang-CL, which it interprets as -Wall.

The _CRT_SECURE_NO_WARNINGS macro is now defined for both Clang and
Clang-CL.

The /entry: flag passed to link.exe is now also passed to lld-link,
letting the windows subsystem tests and examples link.

Fixes #1807.
Closes #1824.
Closes #1874.
2021-04-22 22:37:37 +02:00
Camilla Löwy
a25e8eb50d Add docs for GLFW_X11_XCB_VULKAN_SURFACE
Related to #1793.
2021-04-22 22:33:07 +02:00
Camilla Löwy
f4a7329604 Update USE_MSVC_RUNTIME_LIBRARY_DLL for CMake 3.15
This makes USE_MSVC_RUNTIME_LIBRARY_DLL update the directory scope
CMAKE_MSVC_RUNTIME_LIBRARY variable instead of CMAKE_C_FLAGS on CMake
3.15 and later.

Solution proposed by @moritz-h.

Fixes #1783.
Closes #1796.
2021-04-14 22:50:32 +02:00
Camilla Löwy
33cd8b865d Add issue number to changelog
Related to #1863.
2021-03-19 14:47:46 +01:00
Camilla Löwy
4afa227a05 X11: Fix attribs not applied on leaving fullscreen
If the GLFW_DECORATED and/or GLFW_FLOATING window attributes were
changed while in fullscreen mode, the changes did not take effect when
the window entered windowed mode.

Bug reported on the GLFW forum.
https://discourse.glfw.org/t/turning-on-off-window-decorations-while-in-full-screen-wont-work-properly/1780
2021-03-08 21:55:26 +01:00
Camilla Löwy
2c7f3ce91b Update changelog 2021-02-17 21:22:50 +01:00
Camilla Löwy
729c9988d0 Win32: Fix content area rescaling on older systems
GLFW_SCALE_TO_MONITOR had no effect on Windows 8.1 up to and including
Windows 10 version 1607 (Anniversary Update), despite those having
support for per-monitor DPI.

That done was to avoid handling systems that have non-client scaling,
introduced in Windows 10 version 1607, without reliable overriding of
the new window size, introduced in Windows 10 version 1703 (Creators
Update).  Both are needed to keep the content area at a fixed size for
windows that have GLFW_SCALE_TO_MONITOR disabled.

This change enables window rescaling on Windows 8.1 and all later
versions but disables non-client scaling for unscaled windows on Windows
10 version 1607.  Versions after 1607 are unaffected.

Fixes #1511.
2021-02-10 20:41:40 +01:00
Camilla Löwy
410890aa80 Win32: Fix full screen windows affected by scaling
Per-monitor DPI scaling should not affect full screen windows.

Fixes #1582.
2021-02-10 20:28:54 +01:00
Camilla Löwy
9477311130 Update changelog and add credit 2021-01-18 23:52:27 +01:00
Camilla Löwy
8ab40399d3 Update changelog and add credit
Related to #1833.
2021-01-18 23:52:27 +01:00
Camilla Löwy
8b11867464 Cocoa: Fix menubar for unbundled apps on 10.15
NSApp setActivationPolicy: was being called too soon when the app was
not bundled and launched from the command line.

This fix is based on #1802 by @richardwilkes.

Fixes #1648.
Closes #1802.
2021-01-18 23:52:27 +01:00
Camilla Löwy
552209fe46 Update changelog 2021-01-18 23:52:27 +01:00
Camilla Löwy
5d1d1a01e3 Update repo URL for Nuklear
Fixes #1826.
2021-01-18 02:04:35 +01:00
Camilla Löwy
6ce6b50787 Add credit
Related to #1818.
2020-12-15 02:13:30 +01:00
Camilla Löwy
7e8da57094 Add missing changelog issue number 2020-11-19 02:49:14 +01:00
Leonard König
0dc1005c85 Wayland: Fix destroying CSDs in the correct order
On Wayland we implement Client-Side Decorations if the compositors do not
implement SSDs.  In that case, the destructors of the surfaces were called
in the wrong order, leading to a dereference of an already freed object.
We need to first destroy the subsurface before destroying the parent surface.

Related PR on kitty: https://github.com/kovidgoyal/kitty/pull/3066
Related issue on kitty: https://github.com/kovidgoyal/kitty/issues/3051

Closes #1798.
2020-11-19 02:47:30 +01:00
Camilla Löwy
3327050ca6 Cocoa: Fix ObjC being built as C with CMake 3.19
CMake 3.19 adds -xc when the LANGUAGE file property is C, breaking our
workaround for CMake 3.15 and earlier not understanding the .m suffix.

Fixes #1787.
2020-11-18 00:11:13 +01:00
Camilla Löwy
5c928ff452 Add credit
Related to #1774 and #1782.
2020-11-11 19:14:29 +01:00
Camilla Löwy
0bccc3852b Win32: Filter out duplicate size events
This mirrors the filtering done on X11 and Cocoa.  Possibly this should
be done by shared code instead.

Fixes #1610.
2020-11-11 19:10:19 +01:00
Camilla Löwy
ac627706ef Win32: Fix clang-cl interpreting -Wall as /Wall
Unlike -Wall, VS /Wall really means all warnings.

Closes #1780.
2020-11-11 19:10:05 +01:00
Camilla Löwy
35f3508ecd Update changelog and add credit
Related to #1786.
2020-10-20 20:03:58 +02:00
Camilla Löwy
a506a8dc73 Add credit
Related to #1779 and #1781.
2020-10-05 23:25:32 +02:00
Camilla Löwy
48aa567d0c Update changelog and add credit
Related to #1775.
2020-10-05 23:24:12 +02:00
Camilla Löwy
60e7364b30 Update changelog
Related to #1761.
2020-10-05 23:24:12 +02:00
Emmanuel Gil Peyrot
40d150c399 Docs: Remove mentions of extra-cmake-modules 2020-09-30 17:04:20 +02:00
Camilla Löwy
da26eefc61 Update changelog 2020-08-13 15:14:59 +02:00
Camilla Löwy
05dd2fa298 Win32: Disable fb transparency when it is broken
On Windows 7, when GLFW framebuffer transparency and the DWM are enabled
but DWM transparency is disabled (i.e. when the Transparency setting is
disabled under Personalization > Color), the contents of the framebuffer
is combined with the last frame using additive blending instead of
replacing the previous contents.

This commit limits GLFW framebuffer transparency on Windows 7 to when
DWM transparency is enabled, removing the previous workaround of setting
a layered window color key that led to rendering artifacts.

Fixes #1512.
2020-07-29 15:21:45 +02:00
Camilla Löwy
a2674a9034 Cocoa: Fix potential leak of CFNumber object
Spotted by Clang static analysis.
2020-07-23 22:27:40 +02:00
Camilla Löwy
782e6b6cef Make joystick platform code init on demand
This makes joystick support initialize the first time a joystick
function is called, including those gamepad functions that are layered
on top of joystick functions.

Related to #1284.
Related to #1646.
2020-07-21 17:38:56 +02: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
Camilla Löwy
a122d91303 Documentation work for GLFW_MOUSE_PASSTHROUGH
Related to #1568.
2020-07-15 18:02:38 +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
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
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
aec9fae8f3 EGL: Add support for EGL_EXT_platform_base
This adds support for EGL_EXT_platform_base and its associated X11 and
Wayland extensions, allowing us to explicitly tell EGL which window
system we are using.

This is based on work by @linkmauve in #1691.

Closes #1691.
2020-06-24 00:49:55 +02:00