# Latest

**URL:** https://discourse.glfw.org/latest.md?page=2

[Latest](https://discourse.glfw.org/latest.md) · [Categories](https://discourse.glfw.org/categories.md)

**Page:** 3

---

## [glfwSetKeyCallback() returning NULL but apparently succeeding](https://discourse.glfw.org/t/glfwsetkeycallback-returning-null-but-apparently-succeeding/2873)

<div class="topic-metadata">

**Author:** [@oneshade](https://discourse.glfw.org/u/oneshade)\
**Replies:** 2\
**Last updated:** [March 13, 2025, 4:14am UTC](https://discourse.glfw.org/t/glfwsetkeycallback-returning-null-but-apparently-succeeding/2873 "2025-03-13T04:14:07Z")

</div>

I ran into this issue with a project where I was trying to extensively check for errors and was (seemingly) erroneously getting an error when setting callbacks despite the callbacks seemingly being registered and getting…

---

## [Smooth resizing on Windows](https://discourse.glfw.org/t/smooth-resizing-on-windows/2867)

<div class="topic-metadata">

**Author:** [@constantitus](https://discourse.glfw.org/u/constantitus)\
**Replies:** 4\
**Last updated:** [March 12, 2025, 2:15pm UTC](https://discourse.glfw.org/t/smooth-resizing-on-windows/2867 "2025-03-12T14:15:30Z")

</div>

I am running a setup where all glfw calls are on a separate thread so my program doesn’t block when the window is being resized. My issue is that the resize callback is only being called once, when I release the mouse. I…

---

## [glfwGetKey always returns 0 (C++/Lua)](https://discourse.glfw.org/t/glfwgetkey-always-returns-0-c-lua/2870)

<div class="topic-metadata">

**Author:** [@bart](https://discourse.glfw.org/u/bart)\
**Replies:** 1\
**Last updated:** [March 4, 2025, 9:36am UTC](https://discourse.glfw.org/t/glfwgetkey-always-returns-0-c-lua/2870 "2025-03-04T09:36:19Z")

</div>

I’m making a little game framework in C++ with full Lua scripting using OpenGL, GLFW and GLEW and it seems that input is not being proccessed correctly by GLFW? #include \<iostream\> #include \<cstring\> #include \<GL/glew.…

---

## [Detecting proportion between screen coordinates and pixels](https://discourse.glfw.org/t/detecting-proportion-between-screen-coordinates-and-pixels/2861)

<div class="topic-metadata">

**Author:** [@zix527](https://discourse.glfw.org/u/zix527)\
**Replies:** 2\
**Last updated:** [February 28, 2025, 1:08pm UTC](https://discourse.glfw.org/t/detecting-proportion-between-screen-coordinates-and-pixels/2861 "2025-02-28T13:08:19Z")

</div>

I am writing app with use of GLFW as window manager and I try to understand how window size in screen coordinates translates to framebuffer size. On most screens screen coordinate = pixel, from what I know, but retina di…

---

## [Cmake error when building GLFW](https://discourse.glfw.org/t/cmake-error-when-building-glfw/2858)

<div class="topic-metadata">

**Author:** [@Ziptip](https://discourse.glfw.org/u/Ziptip)\
**Replies:** 2\
**Last updated:** [February 27, 2025, 1:30am UTC](https://discourse.glfw.org/t/cmake-error-when-building-glfw/2858 "2025-02-27T01:30:59Z")

</div>

I downloaded the GLFW sources and started building, chose the mingw makefiles configuration and an error appeared: CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt …

---

## [GLFW Window Freezing When Resizing on High-DPI Displays](https://discourse.glfw.org/t/glfw-window-freezing-when-resizing-on-high-dpi-displays/2847)

<div class="topic-metadata">

**Author:** [@volekay](https://discourse.glfw.org/u/volekay)\
**Replies:** 1\
**Last updated:** [February 23, 2025, 9:55am UTC](https://discourse.glfw.org/t/glfw-window-freezing-when-resizing-on-high-dpi-displays/2847 "2025-02-23T09:55:38Z")

</div>

Hello I’m encountering an issue where a GLFW window becomes unresponsive or lags significantly when resized on a high-DPI display (e.g., 4K monitor with scaling enabled). :innocent:The problem is more noticeable when u…

---

## [Multi axis controller reports cumulative axis values](https://discourse.glfw.org/t/multi-axis-controller-reports-cumulative-axis-values/2686)

<div class="topic-metadata">

**Author:** [@tksuoran](https://discourse.glfw.org/u/tksuoran)\
**Replies:** 3\
**Last updated:** [February 20, 2025, 4:58pm UTC](https://discourse.glfw.org/t/multi-axis-controller-reports-cumulative-axis-values/2686 "2025-02-20T16:58:04Z")

</div>

I have Space Navigator 3D mouse, which is a HID multi axis controller. This has translation X, Y, Z, and rotation X, Y, Z, and two buttons. I can see that glfw already supports this device as a joystick, with a twist. F…

---

## [glfwInit() failing with Wayland: Failed to connect to display](https://discourse.glfw.org/t/glfwinit-failing-with-wayland-failed-to-connect-to-display/2621)

<div class="topic-metadata">

**Author:** [@jamincollins](https://discourse.glfw.org/u/jamincollins)\
**Replies:** 3\
**Last updated:** [February 16, 2025, 7:34pm UTC](https://discourse.glfw.org/t/glfwinit-failing-with-wayland-failed-to-connect-to-display/2621 "2025-02-16T19:34:02Z")

</div>

I’m attempting to initialize GLFW on an X11 session, but it is failing with the following: error code: 65544 description: Wayland: Failed to connect to display I have the following environment variables set: XDG\_SESS…

---

## [GLFW on Linux CMake finds no libraries](https://discourse.glfw.org/t/glfw-on-linux-cmake-finds-no-libraries/2733)

<div class="topic-metadata">

**Author:** [@CCCostigan](https://discourse.glfw.org/u/CCCostigan)\
**Replies:** 8\
**Last updated:** [February 16, 2025, 5:30am UTC](https://discourse.glfw.org/t/glfw-on-linux-cmake-finds-no-libraries/2733 "2025-02-16T05:30:03Z")

</div>

GLFW on Linux apparently doesn’t support CMake. Here are 2 solutions At command prompt find where glfw is actually installed. Something like: sudo find / 2\>/dev/null -iname “libglfw\*” pick one that looks about right…

---

## [GLFW blocks manually configured native window properties?](https://discourse.glfw.org/t/glfw-blocks-manually-configured-native-window-properties/2835)

<div class="topic-metadata">

**Author:** [@doublespiral](https://discourse.glfw.org/u/doublespiral)\
**Replies:** 0\
**Last updated:** [February 10, 2025, 3:30pm UTC](https://discourse.glfw.org/t/glfw-blocks-manually-configured-native-window-properties/2835 "2025-02-10T15:30:34Z")

</div>

I want to alter the native properties of a glfw window It is possible, but the specific property im after (rendering the window behind all other windows) isnt working I know for a fact this property works as i made an …

---

## [How to find out if program is running in wayland or x11 at runtime](https://discourse.glfw.org/t/how-to-find-out-if-program-is-running-in-wayland-or-x11-at-runtime/2841)

<div class="topic-metadata">

**Author:** [@constantitus](https://discourse.glfw.org/u/constantitus)\
**Replies:** 2\
**Last updated:** [February 12, 2025, 2:01pm UTC](https://discourse.glfw.org/t/how-to-find-out-if-program-is-running-in-wayland-or-x11-at-runtime/2841 "2025-02-12T14:01:50Z")

</div>

On linux, glfw will pick from either x11 or wayland depending on which is available. Can I check whick one it initialized at runtime ? I need to implement some backend specific functionality and I need to do it for both …

---

## [Linking & Compiling GLFW with MinGW](https://discourse.glfw.org/t/linking-compiling-glfw-with-mingw/1969)

<div class="topic-metadata">

**Author:** [@williamlii](https://discourse.glfw.org/u/williamlii)\
**Replies:** 9\
**Last updated:** [February 11, 2025, 8:24am UTC](https://discourse.glfw.org/t/linking-compiling-glfw-with-mingw/1969 "2025-02-11T08:24:24Z")

</div>

Hi, I have tried for days to get GLFW to open a window in Visual Studio Code using mingw64. I have read every forum post and nothing has worked so far. I had it easily working with VS 2022 but not with VS Code. I get an…

---

## [Move "update\_mappings" CMake target](https://discourse.glfw.org/t/move-update-mappings-cmake-target/2830)

<div class="topic-metadata">

**Author:** [@Blob](https://discourse.glfw.org/u/Blob)\
**Replies:** 2\
**Last updated:** [January 31, 2025, 6:13pm UTC](https://discourse.glfw.org/t/move-update-mappings-cmake-target/2830 "2025-01-31T18:13:54Z")

</div>

Hi guys, I’m using GLFW as CMake submodule for my project. For my submodules I have a dedicated directory where I want to place them all. However when I configure the location for the GLFW submodule, an extra “Update\_m…

---

## [Question regarding multithreading](https://discourse.glfw.org/t/question-regarding-multithreading/2827)

<div class="topic-metadata">

**Author:** [@constantitus](https://discourse.glfw.org/u/constantitus)\
**Replies:** 5\
**Last updated:** [January 31, 2025, 5:51pm UTC](https://discourse.glfw.org/t/question-regarding-multithreading/2827 "2025-01-31T17:51:07Z")

</div>

The glfw documentation on Thread safety says the following: Most GLFW functions must only be called from the main thread (the thread that calls main), but some may be called from any thread once the library has been in…

---

## [Licence for using GLFW3 logo](https://discourse.glfw.org/t/licence-for-using-glfw3-logo/2824)

<div class="topic-metadata">

**Author:** [@kcleal](https://discourse.glfw.org/u/kcleal)\
**Replies:** 3\
**Last updated:** [January 24, 2025, 12:03pm UTC](https://discourse.glfw.org/t/licence-for-using-glfw3-logo/2824 "2025-01-24T12:03:54Z")

</div>

Hi there, I am putting together a science paper and want to acknowledge the use of GLFW3 in my software. In one of the figures in the paper, I have used the GLFW3 logo found on the main website (screenshotted below). Iv…

---

## [\_\_imp error when setting up glfw and glad](https://discourse.glfw.org/t/imp-error-when-setting-up-glfw-and-glad/2819)

<div class="topic-metadata">

**Author:** [@jonathan9267](https://discourse.glfw.org/u/jonathan9267)\
**Replies:** 1\
**Last updated:** [January 19, 2025, 7:27pm UTC](https://discourse.glfw.org/t/imp-error-when-setting-up-glfw-and-glad/2819 "2025-01-19T19:27:23Z")

</div>

I am trying to setup a project using CMake. I am setting up my CMakeLists like so: cmake\_minimum\_required( VERSION 3.6 ) project (Test) set( GLFW\_BUILD\_DOCS OFF CACHE BOOL "GLFW lib only" ) set( GLFW\_INSTALL OFF CACH…

---

## [Errors setting up opengl, glad, and glfw](https://discourse.glfw.org/t/errors-setting-up-opengl-glad-and-glfw/2817)

<div class="topic-metadata">

**Author:** [@DavidNodeB](https://discourse.glfw.org/u/DavidNodeB)\
**Replies:** 1\
**Last updated:** [January 13, 2025, 5:21pm UTC](https://discourse.glfw.org/t/errors-setting-up-opengl-glad-and-glfw/2817 "2025-01-13T17:21:16Z")

</div>

Steps I did installed glfw source zip used cmake to create a build folder with glfw3.lib inside of it created a folder in my c drive called opengl and make two folders inside of it called include and lib installed glad …

---

## [Custom Window Decorations on Linux](https://discourse.glfw.org/t/custom-window-decorations-on-linux/2812)

<div class="topic-metadata">

**Author:** [@WerWolv](https://discourse.glfw.org/u/WerWolv)\
**Replies:** 1\
**Last updated:** [January 9, 2025, 11:39am UTC](https://discourse.glfw.org/t/custom-window-decorations-on-linux/2812 "2025-01-09T11:39:35Z")

</div>

Hi! What’s the correct way to handle custom window decorations on Linux with glfw? (Both under X11 and Wayland) Currently, implementing these is very platform dependent. For example, on Windows I’m using a custom windo…

---

## [Occasional stuttering](https://discourse.glfw.org/t/occasional-stuttering/2816)

<div class="topic-metadata">

**Author:** [@v71](https://discourse.glfw.org/u/v71)\
**Replies:** 1\
**Last updated:** [January 9, 2025, 11:35am UTC](https://discourse.glfw.org/t/occasional-stuttering/2816 "2025-01-09T11:35:18Z")

</div>

Good day, i am experiencing occasional stuttering using opengl , i have tried nearly everyting , vsync off, on, windowed or fullscreen. I had thought I had badly compiled the sources, but i downloaded the lib already com…

---

## [Building GLFW as a shared library from source with cmake](https://discourse.glfw.org/t/building-glfw-as-a-shared-library-from-source-with-cmake/2815)

<div class="topic-metadata">

**Author:** [@birb](https://discourse.glfw.org/u/birb)\
**Replies:** 1\
**Last updated:** [January 4, 2025, 7:25pm UTC](https://discourse.glfw.org/t/building-glfw-as-a-shared-library-from-source-with-cmake/2815 "2025-01-04T19:25:24Z")

</div>

I’m adding GLFW like so FetchContent\_Declare( glfw GIT\_REPOSITORY https://github.com/glfw/glfw.git GIT\_TAG "master" GIT\_SHALLOW True BINARY\_DIR "${CMAKE\_CURRENT\_BINARY\_DIR}/glfw-build" SOURCE\_D…

---

## [Setting up GLFW on a Windows Computer without Visual Studio](https://discourse.glfw.org/t/setting-up-glfw-on-a-windows-computer-without-visual-studio/2796)

<div class="topic-metadata">

**Author:** [@York](https://discourse.glfw.org/u/York)\
**Replies:** 2\
**Last updated:** [December 27, 2024, 9:31am UTC](https://discourse.glfw.org/t/setting-up-glfw-on-a-windows-computer-without-visual-studio/2796 "2024-12-27T09:31:10Z")

</div>

I have been programming with C++ using notepad on Windows, and want to use GLFW. All the guides for setting up GLFW I have found use Visual Studio, is this the only way to set it up?

---

## [How to center a Window at Screen?](https://discourse.glfw.org/t/how-to-center-a-window-at-screen/593)

<div class="topic-metadata">

**Author:** [@system](https://discourse.glfw.org/u/system)\
**Replies:** 7\
**Last updated:** [December 25, 2024, 8:23am UTC](https://discourse.glfw.org/t/how-to-center-a-window-at-screen/593 "2024-12-25T08:23:49Z")

</div>

phoenix94 wrote on Wednesday, July 10, 2013: Hello, I tried to create a Window with GLFW an then Center it on the Screen with glfwSetWindowPos(). But unfortunately I'm not able to get the current size of my Desktop S…

---

## [Is it possible to create a game window that is horizontally, vertically, or fully maximized, and also minimize to the system tray?](https://discourse.glfw.org/t/is-it-possible-to-create-a-game-window-that-is-horizontally-vertically-or-fully-maximized-and-also-minimize-to-the-system-tray/2803)

<div class="topic-metadata">

**Author:** [@whiletrue111](https://discourse.glfw.org/u/whiletrue111)\
**Replies:** 1\
**Last updated:** [December 23, 2024, 7:00pm UTC](https://discourse.glfw.org/t/is-it-possible-to-create-a-game-window-that-is-horizontally-vertically-or-fully-maximized-and-also-minimize-to-the-system-tray/2803 "2024-12-23T19:00:20Z")

</div>

Hello everyone, I’d like to find out if it’s possible to achieve the following with SDL2, or if I need to embed SDL2 into another Windows framework: Position the game window to occupy one-third of the desktop screen h…

---

## [How to get DualSense mute btn and touchpad press state?](https://discourse.glfw.org/t/how-to-get-dualsense-mute-btn-and-touchpad-press-state/2794)

<div class="topic-metadata">

**Author:** [@SenPie](https://discourse.glfw.org/u/SenPie)\
**Replies:** 4\
**Last updated:** [December 18, 2024, 6:41pm UTC](https://discourse.glfw.org/t/how-to-get-dualsense-mute-btn-and-touchpad-press-state/2794 "2024-12-18T18:41:23Z")

</div>

Hi, I’m using GLFW for my app. The GLFW uses SDL Controller DB to map device input to abstract gamepad. However, GLFWgamepadstate doesn’t contain states for Dual Sense mute button and touchpad button. In the db.txt from …

---

## [Two questions about GLFW](https://discourse.glfw.org/t/two-questions-about-glfw/2791)

<div class="topic-metadata">

**Author:** [@OdinKG](https://discourse.glfw.org/u/OdinKG)\
**Replies:** 1\
**Last updated:** [December 17, 2024, 4:18pm UTC](https://discourse.glfw.org/t/two-questions-about-glfw/2791 "2024-12-17T16:18:58Z")

</div>

Hello, Does GLFW have the support of full-fledged Drag & Drop ? For example, I need to register own data format. Can I use GLFW as shared library in my application ? For example, in case with wxWidgets I can’t copy lib…

---

## [Memory leak caused GLFW](https://discourse.glfw.org/t/memory-leak-caused-glfw/2787)

<div class="topic-metadata">

**Author:** [@qy9](https://discourse.glfw.org/u/qy9)\
**Replies:** 4\
**Last updated:** [November 24, 2024, 1:53pm UTC](https://discourse.glfw.org/t/memory-leak-caused-glfw/2787 "2024-11-24T13:53:06Z")

</div>

The very short code below makes a memory leak, I used valgrind-3.19.0 from the debian repository to detect it. GLFW 3.4 and the code below was compiled with gcc 12.2.0 gcc memoryTest.c -o memoryTest -L ./glfw-3.4/buil…

---

## [Context sharing between EXE and DLL](https://discourse.glfw.org/t/context-sharing-between-exe-and-dll/2784)

<div class="topic-metadata">

**Author:** [@ctf000](https://discourse.glfw.org/u/ctf000)\
**Replies:** 2\
**Last updated:** [November 18, 2024, 5:54pm UTC](https://discourse.glfw.org/t/context-sharing-between-exe-and-dll/2784 "2024-11-18T17:54:28Z")

</div>

Hi, I’m making a program with a hot-reloading system, where most of the code is compiled to a DLL and the EXE reloads it whenever a change is made. I’m initializing the window in the EXE and trying to sharing the contex…

---

## [Achieving 360 scene rotation](https://discourse.glfw.org/t/achieving-360-scene-rotation/2785)

<div class="topic-metadata">

**Author:** [@MLL](https://discourse.glfw.org/u/MLL)\
**Replies:** 0\
**Last updated:** [November 18, 2024, 2:38am UTC](https://discourse.glfw.org/t/achieving-360-scene-rotation/2785 "2024-11-18T02:38:23Z")

</div>

Hi everyone, I am building a first person viewer. I am trying to provide the user with control over the viewing. So far I have implemented a toggle procedure so that when the left button of the mouse is pressed the use…

---

## [Not able to set window position](https://discourse.glfw.org/t/not-able-to-set-window-position/166)

<div class="topic-metadata">

**Author:** [@system](https://discourse.glfw.org/u/system)\
**Replies:** 11\
**Last updated:** [November 16, 2024, 7:50pm UTC](https://discourse.glfw.org/t/not-able-to-set-window-position/166 "2024-11-16T19:50:03Z")

</div>

sheeri185adidam wrote on Wednesday, July 29, 2015: Hi, I am creating a window without the border by setting window hint GLFW\_DECORATED to false. If I am not wrong, this is not a fullscreen window but borderless windo…

---

## [Help with School Project](https://discourse.glfw.org/t/help-with-school-project/2778)

<div class="topic-metadata">

**Author:** [@calz0nes](https://discourse.glfw.org/u/calz0nes)\
**Replies:** 0\
**Last updated:** [November 7, 2024, 3:21am UTC](https://discourse.glfw.org/t/help-with-school-project/2778 "2024-11-07T03:21:04Z")

</div>

Hi, a friend and I are working on a Java game using LWJGL for a local competition. We are both relatively new to coding (I code for an FRC robotics team) and my teammate has some experience making web applications. Githu…

[Previous page](https://discourse.glfw.org/latest.md?page=1)

[Next page](https://discourse.glfw.org/latest.md?page=3)
