Skip to content

Commit 21b312f

Browse files
committed
Fixed #23
- mouse up and mouse move listeners were swallowing too many events (both handlers are set on the document not the window to be able to handle multiple windows)
1 parent 7aaf775 commit 21b312f

File tree

7 files changed

+22
-11
lines changed

7 files changed

+22
-11
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cmake_minimum_required(VERSION 3.10)
22

33
set(emscripten-glfw_RELEASE_YEAR "2025")
4-
set(emscripten-glfw_RELEASE_MONTH "08" )
5-
set(emscripten-glfw_RELEASE_DAY "24" )
4+
set(emscripten-glfw_RELEASE_MONTH "09" )
5+
set(emscripten-glfw_RELEASE_DAY "27" )
66

77
set(emscripten-glfw_GLFW_VERSION "3.4.0")
88

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ Introduction
44
This project is an Emscripten port of GLFW written in C++ for the web/wasm platform. The currently supported
55
GLFW API is 3.4.
66

7-
[![emscripten - 4.0.14](https://img.shields.io/badge/emscripten-4.0.14-blue)](https://emscripten.org)
8-
[![contrib.glfw3 - 3.4.0.20250824](https://img.shields.io/badge/contrib.glfw3-3.4.0.20250824-blue)](https://github.com/pongasoft/emscripten-glfw/releases/latest)
7+
[![emscripten - TBD](https://img.shields.io/badge/emscripten-TBD-blue)](https://emscripten.org)
8+
[![contrib.glfw3 - 3.4.0.20250927](https://img.shields.io/badge/contrib.glfw3-3.4.0.20250927-blue)](https://github.com/pongasoft/emscripten-glfw/releases/latest)
99
[![GLFW - 3.4.0](https://img.shields.io/badge/GLFW-3.4.0-blue)](https://www.glfw.org/)
1010
[![License](https://img.shields.io/badge/License-Apache%20License%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
1111
![Compiles](https://github.com/pongasoft/emscripten-glfw/actions/workflows/main.yml/badge.svg)
1212

13+
[![emscripten - 4.0.14](https://img.shields.io/badge/emscripten-4.0.14-blue)](https://emscripten.org)
14+
[![contrib.glfw3 - 3.4.0.20250824](https://img.shields.io/badge/contrib.glfw3-3.4.0.20250824-blue)](https://github.com/pongasoft/emscripten-glfw/releases/latest)
15+
[![GLFW - 3.4.0](https://img.shields.io/badge/GLFW-3.4.0-blue)](https://www.glfw.org/)
16+
1317
Goal
1418
----
1519

@@ -209,6 +213,7 @@ emcc --use-port=contrib.glfw3:disableWarning=true:disableMultiWindow=true main.c
209213
> #### Note about availability in Emscripten
210214
> | Emscripten | this port |
211215
> |------------|----------------|
216+
> | TBD | 3.4.0.20250927 |
212217
> | 4.0.14 | 3.4.0.20250824 |
213218
> | 4.0.11 | 3.4.0.20250607 |
214219
> | 4.0.5 | 3.4.0.20250305 |
@@ -244,6 +249,10 @@ Check the [Building](docs/Building.md) page for details on how to build this pro
244249
245250
Release Notes
246251
-------------
252+
#### 3.4.0.20250927 - 2025-09-27 | TBD
253+
254+
- Fixed [#23](https://github.com/pongasoft/emscripten-glfw/issues/23): Calling `glfwInit()` breaks various input elements
255+
247256
#### 3.4.0.20250824 - 2025-08-24 | Emscripten 4.0.14
248257
249258
- The code has been optimized for size

include/GLFW/emscripten_glfw3_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
// #if EMSCRIPTEN_GLFW_VERSION >= 3'4'0'20240801
2525
// .... code that can be used past a certain release
2626
// #endif
27-
#define EMSCRIPTEN_GLFW_VERSION 3'4'0'20250824
27+
#define EMSCRIPTEN_GLFW_VERSION 3'4'0'20250927
2828

29-
#define EMSCRIPTEN_GLFW_FULL_VERSION_STR "3.4.0.20250824"
29+
#define EMSCRIPTEN_GLFW_FULL_VERSION_STR "3.4.0.20250927"
3030

3131
#endif

port/emscripten-glfw3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#
1515
# @author Yan Pujante
1616

17-
TAG = '3.4.0.20250824'
17+
TAG = '3.4.0.20250927'
1818

1919
EXTERNAL_PORT = f'https://github.com/pongasoft/emscripten-glfw/releases/download/v{TAG}/emscripten-glfw3-{TAG}.zip'
20-
SHA512 = 'b5b3670b80c87571ea56a54e701874d6b2323f74e359782a15c9ae0a931341fb05e4c778945950f8846aef66c7cc48556d30c8cc5939c87e3091c8be63856a1a'
20+
SHA512 = 'c1906c3e9356bf645b9d74115efb4f2029ab3e5bf5a60f18ec6a6a88c22e6374e7e388ef454f4c3c2e4b9b17c4482c04a9401885e956e2bad360acdb5157a35d'
2121
PORT_FILE = 'port/glfw3.py'
2222

2323
# contrib port information (required)

src/cpp/emscripten/glfw3/Context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void Context::addOrRemoveEventListeners(bool iAdd)
181181
if(fSingleWindow)
182182
fSingleWindow->onGlobalMouseMove(iEvent);
183183
#endif
184-
return true;
184+
return false;
185185
})
186186
.add(emscripten_set_mousemove_callback_on_thread);
187187

src/cpp/emscripten/glfw3/Window.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,10 +795,12 @@ bool Window::onMouseButtonUp(int iGLFWButton)
795795

796796
if(fMouse.fButtonCallback)
797797
fMouse.fButtonCallback(asOpaquePtr(), fMouse.fLastButton, fMouse.fLastButtonState, fKeyboard.computeModifierBits());
798+
799+
return true;
798800
}
799801
}
800802

801-
return true;
803+
return false;
802804
}
803805

804806
//------------------------------------------------------------------------

test/demo/shell.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ <h4 class="clear-float">Actions</h4>
318318
</tr>
319319
<tr>
320320
<td class="action">Change focus</td>
321-
<td colspan="2"><label>Text: <input type="text" id="change-focus"></label></td>
321+
<td colspan="2"><label><input type="range" id="change-focus"></label></td>
322322
</tr>
323323
<tr>
324324
<td class="action">Exit main loop</td>

0 commit comments

Comments
 (0)