From 9ba47ca13a2602cd4adcd4d241ee81edc14dee8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Sun, 14 Jan 2024 23:27:14 +0100 Subject: [PATCH 01/24] Start 3.3.10 --- CMakeLists.txt | 2 +- README.md | 28 +--------------------------- include/GLFW/glfw3.h | 2 +- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b035b984..840808dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.0...3.20 FATAL_ERROR) -project(GLFW VERSION 3.3.9 LANGUAGES C) +project(GLFW VERSION 3.3.10 LANGUAGES C) if (POLICY CMP0054) cmake_policy(SET CMP0054 NEW) diff --git a/README.md b/README.md index 486679b1..7c59dea9 100644 --- a/README.md +++ b/README.md @@ -123,33 +123,7 @@ information on what to include when reporting a bug. ## Changelog - - Bugfix: `glfwGetKeyScancode` returned `0` on error when initialized instead of `-1` - - Bugfix: Failure to make a newly created context current could cause segfault (#2327) - - [Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420) - - [Win32] Bugfix: `glfwWaitEventsTimeout` did not return for some sent messages (#2408) - - [Win32] Bugfix: XInput could reportedly provide invalid DPad bit masks (#2291) - - [Cocoa] Bugfix: Compilation failed on OS X 10.8 due to unconditional use of 10.9+ - symbols (#2161) - - [Cocoa] Bugfix: Full screen windows were resizable by the user (#2377,#2405) - - [Cocoa] Bugfix: Full screen windows were miniaturized when clicked on macOS - 10.15 (#2377,#2405) - - [Cocoa] Bugfix: Querying joystick elements could reportedly segfault on macOS - 13 Ventura (#2320) - - [Cocoa] Bugfix: Print Screen key was not correctly reported (#1786,#2169) - - [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693) - - [Wayland] Bugfix: Connecting a mouse after `glfwInit` would segfault (#1450) - - [Wayland] Disabled alpha channel for opaque windows on systems lacking - `EGL_EXT_present_opaque` (#1895) - - [Wayland] Bugfix: Buffer would overrun when storing received drag offer (#2225) - - [Wayland] Bugfix: Joysticks connected after `glfwInit` were not detected (#2198) - - [Wayland] Bugfix: Fallback decorations emitted `GLFW_CURSOR_UNAVAILABLE` errors - - [Wayland] Bugfix: Some events could fail to end wait for new events (#2397) - - [Linux] Bugfix: Joysticks without buttons were ignored (#2042,#2043) - - [Linux] Bugfix: A small amount of memory could leak if initialization failed (#2229) - - [EGL] Added loading of glvnd `libOpenGL.so.0` where available for OpenGL - - [EGL] Bugfix: `EGL_EXT_present_opaque` caused issues on X11 with Nvidia blob (#2365) - - [EGL] Bugfix: Setting `GLFW_CONTEXT_DEBUG` caused creation to fail (#2348) - - [GLX] Added loading of glvnd `libGLX.so.0` where available +There is nothing here yet. ## Contact diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index c92b768c..8427be1d 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -298,7 +298,7 @@ extern "C" { * release is made that does not contain any API changes. * @ingroup init */ -#define GLFW_VERSION_REVISION 9 +#define GLFW_VERSION_REVISION 10 /*! @} */ /*! @brief One. From 7998629ad256823b1b487486691793db070aa9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Sun, 14 Jan 2024 23:30:32 +0100 Subject: [PATCH 02/24] Linux: Fix regfree being called on invalid data This was caused by a careless merge that did not take the differences between the branches into account. Regression introduced by 7c7cc59889883fa0c19daee122373271670e3b26. Fixes #2464 --- CONTRIBUTORS.md | 1 + README.md | 2 +- src/linux_joystick.c | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 01783375..6f2d0f9b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -202,6 +202,7 @@ video tutorials. - Aleksey Rybalkin - Mikko Rytkönen - Riku Salminen + - Anton Samokhvalov - Brandon Schaefer - Sebastian Schuberth - Christian Sdunek diff --git a/README.md b/README.md index 7c59dea9..a23d146b 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ information on what to include when reporting a bug. ## Changelog -There is nothing here yet. + - [Linux] Bugfix: `regfree´ was called on invalid data (#2464) ## Contact diff --git a/src/linux_joystick.c b/src/linux_joystick.c index 63b43da9..e4101feb 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -334,8 +334,6 @@ void _glfwTerminateJoysticksLinux(void) closeJoystick(js); } - regfree(&_glfw.linjs.regex); - if (_glfw.linjs.inotify > 0) { if (_glfw.linjs.watch > 0) From a943d9ac178430d572b3aa04e620b7912b864e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 14 Dec 2023 15:27:53 +0100 Subject: [PATCH 03/24] Add credit I lost track of the existing PR #2254 when fixing #2161 with 5e4496cb420df4d93b4a31805b9fef443433f73b. Closes #2254 (cherry picked from commit ab09dc8fb17ab08a6b318417b84896801568c002) --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6f2d0f9b..b04aef2b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -129,6 +129,7 @@ video tutorials. - lo-v-ol - Eyal Lotem - Aaron Loucks + - Ned Loynd - Luflosi - lukect - Tristam MacDonald From c710d2c05d4e62e408f73116f00978319c22de2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 3 Jan 2024 18:01:29 +0100 Subject: [PATCH 04/24] Wayland: Fix segfault on termination A segfault could occur during termination if libdecor was found but no windows were created between initialization and termination. The wait for libdecor to finish its initialization was only performed before window creation, not at termination. Regression introduced by 9fdc425931888ea70bc095e53cc006fca8ccb703. This was adapted to 3.3-stable from 4e8c4901e9985765a3951423ff9174459339a62b. --- README.md | 1 + src/wl_init.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a23d146b..ed88f277 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ information on what to include when reporting a bug. ## Changelog + - [Wayland] Bugfix: Terminating the library before showing a window could segfault - [Linux] Bugfix: `regfree´ was called on invalid data (#2464) diff --git a/src/wl_init.c b/src/wl_init.c index bc786677..f66c63a7 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -637,10 +637,15 @@ void _glfwPlatformTerminate(void) _glfwTerminateEGL(); _glfwTerminateOSMesa(); - if (_glfw.wl.libdecor.callback) - wl_callback_destroy(_glfw.wl.libdecor.callback); if (_glfw.wl.libdecor.context) + { + // Allow libdecor to finish receiving all its requested globals + // and ensure the associated sync callback object is destroyed + while (!_glfw.wl.libdecor.ready) + _glfwPlatformWaitEvents(); + libdecor_unref(_glfw.wl.libdecor.context); + } if (_glfw.wl.libdecor.handle) { From 0161cde6f3a416f7bd9be51613505849dd82e5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 3 Jan 2024 18:01:56 +0100 Subject: [PATCH 05/24] Add build- prefix to .gitignore (cherry picked from commit 5a9ea8f99f27cfb0bf47ecc23fdc24e98098de6b) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9a9305f4..cbe19ecb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # The canonical out-of-tree build subdirectory build +build-* # Visual Studio clutter _ReSharper* From 76227fa5192e497d6c1417bb607d2f49e857061d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 4 Jan 2024 20:07:27 +0100 Subject: [PATCH 06/24] Fix missing error in docs for glfwCreateWindow The GLFW_NO_WINDOW_CONTEXT error can be emitted if the window passed in for context sharing does not have a context. Fixes #2456 (cherry picked from commit 73948e6c0f15b1053cf74b7c4e6b04fd36e97e29) --- include/GLFW/glfw3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 8427be1d..cb972e56 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -2611,8 +2611,8 @@ GLFWAPI void glfwWindowHintString(int hint, const char* value); * * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref - * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref - * GLFW_PLATFORM_ERROR. + * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE, @ref + * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. * * @remark @win32 Window creation will fail if the Microsoft GDI software * OpenGL implementation is the only one available. From dbe2d7cb4af85c01f5d9a0f5abad20e7cec55a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 15 Jan 2024 00:23:20 +0100 Subject: [PATCH 07/24] Set timeout for build GH workflow jobs This is in order to catch and stop any malfunctioning job. This was adapted to 3.3-stable from d5461d2927ac712ded603f7f133f18e9a02caeb4. --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 55262d89..57a2212e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ jobs: build-linux-x11-clang: name: X11 (Linux, Clang) runs-on: ubuntu-latest + timeout-minutes: 4 env: CC: clang CFLAGS: -Werror @@ -35,6 +36,7 @@ jobs: build-linux-wayland-clang: name: Wayland (Linux, Clang) runs-on: ubuntu-latest + timeout-minutes: 4 env: CC: clang CFLAGS: -Werror @@ -58,6 +60,7 @@ jobs: build-linux-null-clang: name: Null (Linux, Clang) runs-on: ubuntu-latest + timeout-minutes: 4 env: CC: clang CFLAGS: -Werror @@ -81,6 +84,7 @@ jobs: build-macos-cocoa-clang: name: Cocoa (macOS, Clang) runs-on: macos-latest + timeout-minutes: 4 env: CFLAGS: -Werror MACOSX_DEPLOYMENT_TARGET: 10.8 @@ -100,6 +104,7 @@ jobs: build-windows-win32-vs2022: name: Win32 (Windows, VS2022) runs-on: windows-latest + timeout-minutes: 4 env: CFLAGS: /WX steps: From 7554375d6d00c3b2855e8a4ac7e132d373d7e6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 15 Jan 2024 00:28:00 +0100 Subject: [PATCH 08/24] Update CODEOWNERS file (cherry picked from commit cf29ff2b9d5f2b66f8fc714e14b86989a7aa388d) --- .github/CODEOWNERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 018808ba..585b2090 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,8 +1,6 @@ * @elmindreda -src/wl_* @linkmauve - docs/*.css @glfw/webdev docs/*.scss @glfw/webdev docs/*.html @glfw/webdev From fafcba3824d6877a6aa2af7a5e28c7fa0942851a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 16 Jan 2024 22:59:35 +0100 Subject: [PATCH 09/24] Wayland: Clean up pointer axis handler (cherry picked from commit 9afbcb442bc1e9e173b0b76ba4f7290b137b4d4d) --- src/wl_window.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/wl_window.c b/src/wl_window.c index 985a5711..a077c15a 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1537,24 +1537,14 @@ static void pointerHandleAxis(void* userData, wl_fixed_t value) { _GLFWwindow* window = _glfw.wl.pointerFocus; - double x = 0.0, y = 0.0; - // Wayland scroll events are in pointer motion coordinate space (think two - // finger scroll). The factor 10 is commonly used to convert to "scroll - // step means 1.0. - const double scrollFactor = 1.0 / 10.0; - if (!window) return; - assert(axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL || - axis == WL_POINTER_AXIS_VERTICAL_SCROLL); - + // NOTE: 10 units of motion per mouse wheel step seems to be a common ratio if (axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL) - x = -wl_fixed_to_double(value) * scrollFactor; + _glfwInputScroll(window, -wl_fixed_to_double(value) / 10.0, 0.0); else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL) - y = -wl_fixed_to_double(value) * scrollFactor; - - _glfwInputScroll(window, x, y); + _glfwInputScroll(window, 0.0, -wl_fixed_to_double(value) / 10.0); } static const struct wl_pointer_listener pointerListener = From 20bd0329a56ab973737510fe2132605966543301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 24 Jan 2024 17:06:15 +0100 Subject: [PATCH 10/24] Clarify event test reporting of keys Reshuffled line to group key-related items together. Omitted key code output for unknown keys to put focus on the (lack of) name. (cherry picked from commit d81fcb93f185a2dc9b9872cbfc51f5498b8386ff) --- tests/events.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/tests/events.c b/tests/events.c index 9f698f26..455f886f 100644 --- a/tests/events.c +++ b/tests/events.c @@ -393,24 +393,34 @@ static void scroll_callback(GLFWwindow* window, double x, double y) static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) { Slot* slot = glfwGetWindowUserPointer(window); - const char* name = glfwGetKeyName(key, scancode); - if (name) + if (key == GLFW_KEY_UNKNOWN) { - printf("%08x to %i at %0.3f: Key 0x%04x Scancode 0x%04x (%s) (%s) (with%s) was %s\n", - counter++, slot->number, glfwGetTime(), key, scancode, - get_key_name(key), - name, - get_mods_name(mods), - get_action_name(action)); + printf("%08x to %i at %0.3f: Key (%s) Scancode 0x%04x (with%s) was %s\n", + counter++, slot->number, glfwGetTime(), + get_key_name(key), scancode, + get_mods_name(mods), + get_action_name(action)); } else { - printf("%08x to %i at %0.3f: Key 0x%04x Scancode 0x%04x (%s) (with%s) was %s\n", - counter++, slot->number, glfwGetTime(), key, scancode, - get_key_name(key), - get_mods_name(mods), - get_action_name(action)); + const char* name = glfwGetKeyName(key, scancode); + if (name) + { + printf("%08x to %i at %0.3f: Key 0x%04x (%s) Scancode 0x%04x Name %s (with%s) was %s\n", + counter++, slot->number, glfwGetTime(), + key, get_key_name(key), scancode, name, + get_mods_name(mods), + get_action_name(action)); + } + else + { + printf("%08x to %i at %0.3f: Key 0x%04x (%s) Scancode 0x%04x (with%s) was %s\n", + counter++, slot->number, glfwGetTime(), + key, get_key_name(key), scancode, + get_mods_name(mods), + get_action_name(action)); + } } if (action != GLFW_PRESS) From bfa24c9f2d0b640ccc27cfbd221849b153f6a5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 13 Dec 2023 15:27:30 +0100 Subject: [PATCH 11/24] Fix glfwGetKeyName incorrectly emitting error glfwGetKeyName emitted GLFW_INVALID_VALUE when passed GLFW_KEY_UNKNOWN and any scancode not associated with a key token on that platform. This causes physical keys with no associated key token to emit GLFW_INVALID_VALUE when the key and scancode are passed directly from the key event to glfwGetKeyName. This breaks the promise made in the reference documentation for glfwGetKeyName. This commit removes that error for the whole range of valid scancodes. Fixes #1785 Fixes #2214 This was adapted to 3.3-stable from 86bf5698ecfdbe783135ffaf72972a8c562c0fdf. --- CONTRIBUTORS.md | 1 + README.md | 2 ++ src/cocoa_window.m | 5 +++-- src/win32_window.c | 11 ++++++++--- src/wl_window.c | 6 ++++-- src/x11_window.c | 6 ++++-- 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index b04aef2b..367ab358 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -255,6 +255,7 @@ video tutorials. - Jay Weisskopf - Frank Wille - Richard A. Wilkes + - Andy Williams - Tatsuya Yatagawa - Ryogo Yoshimura - Rácz Zalán diff --git a/README.md b/README.md index ed88f277..092445f6 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,8 @@ information on what to include when reporting a bug. ## Changelog + - Bugfix: `glfwGetKeyName` emitted `GLFW_INVALID_VALUE` for scancodes with no + key token (#1785,#2214) - [Wayland] Bugfix: Terminating the library before showing a window could segfault - [Linux] Bugfix: `regfree´ was called on invalid data (#2464) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 2d065c35..d7e89cf3 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1635,14 +1635,15 @@ const char* _glfwPlatformGetScancodeName(int scancode) { @autoreleasepool { - if (scancode < 0 || scancode > 0xff || - _glfw.ns.keycodes[scancode] == GLFW_KEY_UNKNOWN) + if (scancode < 0 || scancode > 0xff) { _glfwInputError(GLFW_INVALID_VALUE, "Invalid scancode %i", scancode); return NULL; } const int key = _glfw.ns.keycodes[scancode]; + if (key == GLFW_KEY_UNKNOWN) + return NULL; UInt32 deadKeyState = 0; UniChar characters[4]; diff --git a/src/win32_window.c b/src/win32_window.c index 3c22ab16..5aecaadd 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -2191,14 +2191,19 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode) const char* _glfwPlatformGetScancodeName(int scancode) { - if (scancode < 0 || scancode > (KF_EXTENDED | 0xff) || - _glfw.win32.keycodes[scancode] == GLFW_KEY_UNKNOWN) + int key; + + if (scancode < 0 || scancode > (KF_EXTENDED | 0xff)) { _glfwInputError(GLFW_INVALID_VALUE, "Invalid scancode %i", scancode); return NULL; } - return _glfw.win32.keynames[_glfw.win32.keycodes[scancode]]; + key = _glfw.win32.keycodes[scancode]; + if (key == GLFW_KEY_UNKNOWN) + return NULL; + + return _glfw.win32.keynames[key]; } int _glfwPlatformGetKeyScancode(int key) diff --git a/src/wl_window.c b/src/wl_window.c index a077c15a..4e51e186 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -2575,8 +2575,7 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode) const char* _glfwPlatformGetScancodeName(int scancode) { - if (scancode < 0 || scancode > 255 || - _glfw.wl.keycodes[scancode] == GLFW_KEY_UNKNOWN) + if (scancode < 0 || scancode > 255) { _glfwInputError(GLFW_INVALID_VALUE, "Wayland: Invalid scancode %i", @@ -2585,6 +2584,9 @@ const char* _glfwPlatformGetScancodeName(int scancode) } const int key = _glfw.wl.keycodes[scancode]; + if (key == GLFW_KEY_UNKNOWN) + return NULL; + const xkb_keycode_t keycode = scancode + 8; const xkb_layout_index_t layout = xkb_state_key_get_layout(_glfw.wl.xkb.state, keycode); diff --git a/src/x11_window.c b/src/x11_window.c index 9bd29e34..ef02f139 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -2930,14 +2930,16 @@ const char* _glfwPlatformGetScancodeName(int scancode) if (!_glfw.x11.xkb.available) return NULL; - if (scancode < 0 || scancode > 0xff || - _glfw.x11.keycodes[scancode] == GLFW_KEY_UNKNOWN) + if (scancode < 0 || scancode > 0xff) { _glfwInputError(GLFW_INVALID_VALUE, "Invalid scancode %i", scancode); return NULL; } const int key = _glfw.x11.keycodes[scancode]; + if (key == GLFW_KEY_UNKNOWN) + return NULL; + const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, _glfw.x11.xkb.group, 0); if (keysym == NoSymbol) From d172fec64be65e7c7216f69d4eb11f78eb71ea4e Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sat, 16 Dec 2023 10:24:48 +0700 Subject: [PATCH 12/24] Update to actions/checkout@v4 from v3 This mainly updates the version of NodeJS used internally to keep up with what's going on at GitHub Actions. Closes #2447 This was adapted to 3.3-stable from becf1dc14b246f2994b60bbdd99ece60d6f86183. --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57a2212e..90293baf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: CC: clang CFLAGS: -Werror steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt update @@ -41,7 +41,7 @@ jobs: CC: clang CFLAGS: -Werror steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt update @@ -65,7 +65,7 @@ jobs: CC: clang CFLAGS: -Werror steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt update @@ -89,7 +89,7 @@ jobs: CFLAGS: -Werror MACOSX_DEPLOYMENT_TARGET: 10.8 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Configure static library run: cmake -S . -B build-static @@ -108,7 +108,7 @@ jobs: env: CFLAGS: /WX steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Configure static library run: cmake -S . -B build-static -G "Visual Studio 17 2022" From 15b771759d7d9cf834656d0efa35c3990d692fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 24 Jan 2024 15:32:32 +0100 Subject: [PATCH 13/24] OSMesa: Fix headers included before shared header The shared header, internal.h, must be the first header included in every compilation unit of GLFW. (cherry picked from commit 291f4d89cd3019b5d0be4fd5d97699036d1b0a67) --- src/osmesa_context.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/osmesa_context.c b/src/osmesa_context.c index 4072728b..0ab8ec76 100644 --- a/src/osmesa_context.c +++ b/src/osmesa_context.c @@ -27,13 +27,12 @@ // Please use C89 style variable declarations in this file because VS 2010 //======================================================================== +#include "internal.h" + #include #include #include -#include "internal.h" - - static void makeContextCurrentOSMesa(_GLFWwindow* window) { if (window) From a1090c867d66326e2316fdeae68bb58bbe6a1feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 24 Jan 2024 16:54:52 +0100 Subject: [PATCH 14/24] Wayland: Fix compilation on FreeBSD The list of compile-time dependencies on FreeBSD lacked evdev-proto. Unlike on Linux, the input-event-codes.h header file was not implicitly included on FreeBSD. Fixes #2445 This was adapted to 3.3-stable from 51920ede6827962ca2fbcad38d1beed1165400af. --- CONTRIBUTORS.md | 1 + README.md | 1 + docs/compile.dox | 6 +++--- src/wl_window.c | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 367ab358..9ba21abd 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -233,6 +233,7 @@ video tutorials. - Paul Sultana - Nathan Sweet - TTK-Bandit + - Nuno Teixeira - Sergey Tikhomirov - Arthur Tombs - TronicLabs diff --git a/README.md b/README.md index 092445f6..e1f3d476 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ information on what to include when reporting a bug. - Bugfix: `glfwGetKeyName` emitted `GLFW_INVALID_VALUE` for scancodes with no key token (#1785,#2214) - [Wayland] Bugfix: Terminating the library before showing a window could segfault + - [Wayland] Bugfix: Compilation failed on FreeBSD (#2445) - [Linux] Bugfix: `regfree´ was called on invalid data (#2464) diff --git a/docs/compile.dox b/docs/compile.dox index 99d5a68e..9bcf14c3 100644 --- a/docs/compile.dox +++ b/docs/compile.dox @@ -97,11 +97,11 @@ On Fedora and derivatives like Red Hat you will need the `wayland-devel`, sudo dnf install wayland-devel libxkbcommon-devel wayland-protocols-devel extra-cmake-modules @endcode -On FreeBSD you will need the `wayland`, `libxkbcommon`, `wayland-protocols` and -`kf5-extra-cmake-modules` packages. +On FreeBSD you will need the `wayland`, `libxkbcommon`, `wayland-protocols`, +`evdev-proto` and `kf5-extra-cmake-modules` packages. @code{.sh} -pkg install wayland libxkbcommon wayland-protocols kf5-extra-cmake-modules +pkg install wayland libxkbcommon wayland-protocols evdev-proto kf5-extra-cmake-modules @endcode Once you have the required depdendencies, move on to @ref compile_generate. diff --git a/src/wl_window.c b/src/wl_window.c index 4e51e186..caa5188d 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -42,6 +42,7 @@ #include #include #include +#include #define GLFW_BORDER_SIZE 4 #define GLFW_CAPTION_HEIGHT 24 From 8d95aeac690472ca38a18130ee328e2a5718ad67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 25 Jan 2024 16:30:56 +0100 Subject: [PATCH 15/24] Remove further traces of IRC channel (cherry picked from commit 23962c9dc7e0aa59199211b03a6fbb5700c01c30) --- README.md | 5 ++--- docs/CONTRIBUTING.md | 7 +++---- docs/SUPPORT.md | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e1f3d476..49320508 100644 --- a/README.md +++ b/README.md @@ -136,13 +136,12 @@ On [glfw.org](https://www.glfw.org/) you can find the latest version of GLFW, as well as news, documentation and other information about the project. If you have questions related to the use of GLFW, we have a -[forum](https://discourse.glfw.org/), and the `#glfw` IRC channel on -[Libera.Chat](https://libera.chat/). +[forum](https://discourse.glfw.org/). If you have a bug to report, a patch to submit or a feature you'd like to request, please file it in the [issue tracker](https://github.com/glfw/glfw/issues) on GitHub. Finally, if you're interested in helping out with the development of GLFW or -porting it to your favorite platform, join us on the forum, GitHub or IRC. +porting it to your favorite platform, join us on the forum or GitHub. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 050c1bed..5eaf7523 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -23,13 +23,12 @@ Questions about how to use GLFW should be asked either in the [support section](https://discourse.glfw.org/c/support) of the forum, under the [Stack Overflow tag](https://stackoverflow.com/questions/tagged/glfw) or [Game Development tag](https://gamedev.stackexchange.com/questions/tagged/glfw) on -Stack Exchange or in the IRC channel `#glfw` on -[Libera.Chat](https://libera.chat/). +Stack Exchange. Questions about the design or implementation of GLFW or about future plans should be asked in the [dev section](https://discourse.glfw.org/c/dev) of the -forum or in the IRC channel. Please don't open a GitHub issue to discuss design -questions without first checking with a maintainer. +forum. Please don't open a GitHub issue to discuss design questions without +first checking with a maintainer. ## Reporting a bug diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md index 79a45a8f..d9be56f7 100644 --- a/docs/SUPPORT.md +++ b/docs/SUPPORT.md @@ -4,8 +4,7 @@ See the [latest documentation](https://www.glfw.org/docs/latest/) for tutorials, guides and the API reference. If you have questions about using GLFW, we have a -[forum](https://discourse.glfw.org/), and the `#glfw` IRC channel on -[Libera.Chat](https://libera.chat/). +[forum](https://discourse.glfw.org/). Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues). Please check the [contribution From 438cd224d7cf47894870f60327a6a457d00d7331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 18 Jan 2024 21:43:50 +0100 Subject: [PATCH 16/24] Fix function return value when uninitialized (cherry picked from commit f74ff2aa10f926cf64ad9c4fd57a05c8004c8192) --- src/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input.c b/src/input.c index 0ae27eef..cbb59455 100644 --- a/src/input.c +++ b/src/input.c @@ -637,7 +637,7 @@ GLFWAPI const char* glfwGetKeyName(int key, int scancode) GLFWAPI int glfwGetKeyScancode(int key) { - _GLFW_REQUIRE_INIT_OR_RETURN(-1); + _GLFW_REQUIRE_INIT_OR_RETURN(0); if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST) { From ae44e10b33b1acf6377fa881829106d03d041f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 18 Jan 2024 21:44:31 +0100 Subject: [PATCH 17/24] Fix function return value when uninitialized (cherry picked from commit d7aeb1eae85f9ea629aff719d4eadf31d51b6e26) --- src/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.c b/src/window.c index 5d80e436..db37a72f 100644 --- a/src/window.c +++ b/src/window.c @@ -694,7 +694,7 @@ GLFWAPI float glfwGetWindowOpacity(GLFWwindow* handle) _GLFWwindow* window = (_GLFWwindow*) handle; assert(window != NULL); - _GLFW_REQUIRE_INIT_OR_RETURN(1.f); + _GLFW_REQUIRE_INIT_OR_RETURN(0.f); return _glfwPlatformGetWindowOpacity(window); } From bc788a9333cf729b5a96d84fd6c61a4539d36a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 30 Jan 2024 18:21:33 +0100 Subject: [PATCH 18/24] WGL: Fix pixel format count in a Parallels VM In a Parallels VM wglGetPixelFormatAttribivARB returns fewer pixel formats than DescribePixelFormat. This broke context creation on Windows in Parallels since the changes in 2c0f34b60f7c7a07183ed71754b0156ece3b6c1b. The previous version of the code worked accidentally. This adds a workaround by iterating through the minimum of both counts. It should have no effect when running on conforming implementations. Tested on Parallels by @ dougbinks. Closes #2191 Fixes #2406 Fixes #2467 This was adapted to 3.3-stable from 00e86d4b733103a23278fe53ce58a0d14dd47d32. --- CONTRIBUTORS.md | 2 ++ README.md | 1 + src/wgl_context.c | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 9ba21abd..684850f7 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -45,6 +45,7 @@ video tutorials. - Bailey Cosier - Noel Cower - CuriouserThing + - Bill Currie - Jason Daly - danhambleton - Jarrod Davis @@ -162,6 +163,7 @@ video tutorials. - Martins Mozeiko - James Murphy - Julian Møller + - NateIsStalling - ndogxj - F. Nedelec - Kristian Nielsen diff --git a/README.md b/README.md index 49320508..9595a4db 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ information on what to include when reporting a bug. - [Wayland] Bugfix: Terminating the library before showing a window could segfault - [Wayland] Bugfix: Compilation failed on FreeBSD (#2445) - [Linux] Bugfix: `regfree´ was called on invalid data (#2464) + - [WGL] Bugfix: Context creation failed in Parallels VM (#2191,#2406,#2467) ## Contact diff --git a/src/wgl_context.c b/src/wgl_context.c index eebf6cd5..b245b292 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -80,6 +80,23 @@ static int choosePixelFormat(_GLFWwindow* window, if (_glfw.wgl.ARB_pixel_format) { + // NOTE: In a Parallels VM WGL_ARB_pixel_format returns fewer pixel formats than + // DescribePixelFormat, violating the guarantees of the extension spec + // HACK: Iterate through the minimum of both counts + + const int attrib = WGL_NUMBER_PIXEL_FORMATS_ARB; + int extensionCount; + + if (!wglGetPixelFormatAttribivARB(window->context.wgl.dc, + 1, 0, 1, &attrib, &extensionCount)) + { + _glfwInputErrorWin32(GLFW_PLATFORM_ERROR, + "WGL: Failed to retrieve pixel format attribute"); + return 0; + } + + nativeCount = _glfw_min(nativeCount, extensionCount); + addAttrib(WGL_SUPPORT_OPENGL_ARB); addAttrib(WGL_DRAW_TO_WINDOW_ARB); addAttrib(WGL_PIXEL_TYPE_ARB); From 2d51e650be911362aa9d7f53a6c214003aae1187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 31 Jan 2024 00:49:53 +0100 Subject: [PATCH 19/24] Document GLFW_FLOATING not supported on Wayland (cherry picked from commit 12043e72189d80ef7574c2ea8fb8190288db6be7) --- include/GLFW/glfw3.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index cb972e56..66145203 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -3561,11 +3561,15 @@ GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib); * @param[in] value `GLFW_TRUE` or `GLFW_FALSE`. * * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. + * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_PLATFORM_ERROR and @ref + * GLFW_FEATURE_UNAVAILABLE (see remarks). * * @remark Calling @ref glfwGetWindowAttrib will always return the latest * value, even if that value is ignored by the current mode of the window. * + * @remark @wayland The [GLFW_FLOATING](@ref GLFW_FLOATING_attrib) window attribute is + * not supported. Setting this will emit @ref GLFW_FEATURE_UNAVAILABLE. + * * @thread_safety This function must only be called from the main thread. * * @sa @ref window_attribs From 0cac1ad41fa3e8ae323c45bd89fa6dc448cc78d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 12 Feb 2024 01:08:38 +0100 Subject: [PATCH 20/24] Fix spelling This was adapted to 3.3-stable from 5a0ab56ed79595ee991e51a951f103a1c612b6a7. --- docs/news.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/news.dox b/docs/news.dox index 103224f5..1db3a069 100644 --- a/docs/news.dox +++ b/docs/news.dox @@ -322,7 +322,7 @@ Starting with GLFW 3.3.7, events posted with @ref glfwPostEmptyEvent now use a s unnamed pipe instead of sending an X11 client event to the helper window. -@subsubsection wayland_alpha_34 Frambuffer may lack alpha channel on older Wayland systems +@subsubsection wayland_alpha_33 Framebuffer may lack alpha channel on older Wayland systems On Wayland, when creating an EGL context on a machine lacking the new `EGL_EXT_present_opaque` extension, the @ref GLFW_ALPHA_BITS window hint will be From a7c3e959807dbbb70c5a336b929b27cf24ed5722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 20 Feb 2024 22:58:20 +0100 Subject: [PATCH 21/24] Fix bad merge This regression was introduced by 2d51e650be911362aa9d7f53a6c214003aae1187. --- include/GLFW/glfw3.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 66145203..b93a0042 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -3561,14 +3561,14 @@ GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib); * @param[in] value `GLFW_TRUE` or `GLFW_FALSE`. * * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_PLATFORM_ERROR and @ref - * GLFW_FEATURE_UNAVAILABLE (see remarks). + * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_PLATFORM_ERROR. * * @remark Calling @ref glfwGetWindowAttrib will always return the latest * value, even if that value is ignored by the current mode of the window. * - * @remark @wayland The [GLFW_FLOATING](@ref GLFW_FLOATING_attrib) window attribute is - * not supported. Setting this will emit @ref GLFW_FEATURE_UNAVAILABLE. + * @remark @wayland The [GLFW_FLOATING](@ref GLFW_FLOATING_attrib) window + * attribute is not supported. Setting this will emit @ref + * GLFW_PLATFORM_ERROR. * * @thread_safety This function must only be called from the main thread. * From 3af1a1f514fecc173cebb587d4cd659753fa2e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 20 Feb 2024 16:26:01 +0100 Subject: [PATCH 22/24] NSGL: ANGLE exists (cherry picked from commit 8f2f766f0d2ed476c03a2ae02e48ac41a9602b03) --- src/nsgl_context.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsgl_context.m b/src/nsgl_context.m index e984caeb..e581b6f8 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -161,7 +161,7 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, if (ctxconfig->client == GLFW_OPENGL_ES_API) { _glfwInputError(GLFW_API_UNAVAILABLE, - "NSGL: OpenGL ES is not available on macOS"); + "NSGL: OpenGL ES is not available via NSGL"); return GLFW_FALSE; } From 07efe9068e1bcc94abb510f98059d62b13f14b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 20 Feb 2024 19:23:52 +0100 Subject: [PATCH 23/24] Improved build guide slightly This was adapted to 3.3-stable from b864e4baeb590465700744a68d083fe0ebce5d74. --- docs/build.dox | 111 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 94 insertions(+), 17 deletions(-) diff --git a/docs/build.dox b/docs/build.dox index faa36b27..1b9c1e11 100644 --- a/docs/build.dox +++ b/docs/build.dox @@ -160,20 +160,94 @@ A good general introduction to linking is David Drysdale. -@subsection build_link_win32 With MinGW or Visual C++ on Windows +@subsection build_link_win32 With Visual C++ and GLFW binaries -The static version of the GLFW library is named `glfw3`. When using this -version, it is also necessary to link with some libraries that GLFW uses. +If you are using a downloaded +[binary archive](https://www.glfw.org/download.html), first make sure you have +the archive matching the architecture you are building for (32-bit or 64-bit), +or you will get link errors. Also make sure you are using the binaries for your +version of Visual C++ or you may get other link errors. -When using MinGW to link an application with the static version of GLFW, you -must also explicitly link with `gdi32`. Other toolchains including MinGW-w64 -include it in the set of default libraries along with other dependencies like -`user32` and `kernel32`. +There are two version of the static GLFW library in the binary archive, because +it needs to use the same base run-time library variant as the rest of your +executable. -The link library for the GLFW DLL is named `glfw3dll`. When compiling an -application that uses the DLL version of GLFW, you need to define the @ref -GLFW_DLL macro _before_ any inclusion of the GLFW header. This can be done -either with a compiler switch or by defining it in your source code. +One is named `glfw3.lib` and is for projects with the _Runtime Library_ project +option set to _Multi-threaded DLL_ or _Multi-threaded Debug DLL_. The other is +named `glfw3_mt.lib` and is for projects with _Runtime Library_ set to +_Multi-threaded_ or _Multi-threaded Debug_. To use the static GLFW library you +will need to add `path/to/glfw3.lib` or `path/to/glfw3_mt.lib` to the +_Additional Dependencies_ project option. + +If you compiled a GLFW static library yourself then there will only be one, +named `glfw3.lib`, and you have to make sure the run-time library variant +matches. + +The DLL version of the GLFW library is named `glfw3.dll`, but you will be +linking against the `glfw3dll.lib` link library. To use the DLL you will need +to add `path/to/glfw3dll.lib` to the _Additional Dependencies_ project option. +All of its dependencies are already listed there by default, but when building +with the DLL version of GLFW, you also need to define the @ref GLFW_DLL. This +can be done either in the _Preprocessor Definitions_ project option or by +defining it in your source code before including the GLFW header. + +@code +#define GLFW_DLL +#include +@endcode + +All link-time dependencies for GLFW are already listed in the _Additional +Dependencies_ option by default. + + +@subsection build_link_mingw With MinGW-w64 and GLFW binaries + +This is intended for building a program from the command-line or by writing +a makefile, on Windows with [MinGW-w64](https://www.mingw-w64.org/) and GLFW +binaries. These can be from a downloaded and extracted +[binary archive](https://www.glfw.org/download.html) or by compiling GLFW +yourself. The paths below assume a binary archive is used. + +If you are using a downloaded binary archive, first make sure you have the +archive matching the architecture you are building for (32-bit or 64-bit) or you +will get link errors. + +Note that the order of source files and libraries matter for GCC. Dependencies +must be listed after the files that depend on them. Any source files that +depend on GLFW must be listed before the GLFW library. GLFW in turn depends on +`gdi32` and must be listed before it. + +If you are using the static version of the GLFW library, which is named +`libglfw3.a`, do: + +@code{.sh} +gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3.a -lgdi32 +@endcode + +If you are using the DLL version of the GLFW library, which is named +`glfw3.dll`, you will need to use the `libglfw3dll.a` link library. + +@code{.sh} +gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32 +@endcode + +The resulting executable will need to find `glfw3.dll` to run, typically by +keeping both files in the same directory. + +When you are building with the DLL version of GLFW, you will also need to define +the @ref GLFW_DLL macro. This can be done in your source files, as long as it +done before including the GLFW header: + +@code +#define GLFW_DLL +#include +@endcode + +It can also be done on the command-line: + +@code{.sh} +gcc -o myprog myprog.c -D GLFW_DLL -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32 +@endcode @subsection build_link_cmake_source With CMake and GLFW source @@ -271,7 +345,10 @@ target_link_libraries(myapp OpenGL::GL) @endcode -@subsection build_link_pkgconfig With makefiles and pkg-config on Unix +@subsection build_link_pkgconfig With pkg-config and GLFW binaries on Unix + +This is intended for building a program from the command-line or by writing +a makefile, on macOS or any Unix-like system like Linux, FreeBSD and Cygwin. GLFW supports [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/), and the `glfw3.pc` pkg-config file is generated when the GLFW library is built @@ -322,13 +399,13 @@ OpenGL and IOKit frameworks to the project as dependencies. They can all be found in `/System/Library/Frameworks`. -@subsection build_link_osx With command-line on macOS +@subsection build_link_osx With command-line or makefile on macOS It is recommended that you use [pkg-config](@ref build_link_pkgconfig) when -building from the command line on macOS. That way you will get any new -dependencies added automatically. If you still wish to build manually, you need -to add the required frameworks and libraries to your command-line yourself using -the `-l` and `-framework` switches. +using installed GLFW binaries from the command line on macOS. That way you will +get any new dependencies added automatically. If you still wish to build +manually, you need to add the required frameworks and libraries to your +command-line yourself using the `-l` and `-framework` switches. If you are using the dynamic GLFW library, which is named `libglfw.3.dylib`, do: From dc46d3f8129712e42856c20e99a604a3b08ad581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 20 Feb 2024 23:38:16 +0100 Subject: [PATCH 24/24] Remove reference to stale Coverity result (cherry picked from commit 421dc66afb383950cc3b49bc6d57d69e50e518c1) --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9595a4db..f77a74d8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Build status](https://github.com/glfw/glfw/actions/workflows/build.yml/badge.svg)](https://github.com/glfw/glfw/actions) [![Build status](https://ci.appveyor.com/api/projects/status/0kf0ct9831i5l6sp/branch/master?svg=true)](https://ci.appveyor.com/project/elmindreda/glfw) -[![Coverity Scan](https://scan.coverity.com/projects/4884/badge.svg)](https://scan.coverity.com/projects/glfw-glfw) ## Introduction