From ee87a9db2383fd9333b3bb41644c3f06c9ae21be Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 17 Feb 2018 18:53:32 +0100 Subject: [PATCH 1/5] Fix enter/escape crashes on Windows (#202) * Do not let slip through IDOK and IDCANCEL as menu events, fixes #55 * Add comment about IDOK and IDCANCEL --- windows/window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows/window.cpp b/windows/window.cpp index 9cf13a25..fbec558b 100644 --- a/windows/window.cpp +++ b/windows/window.cpp @@ -87,7 +87,8 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA // not a menu if (lParam != 0) break; - if (HIWORD(wParam) != 0) + // IDOK (1) and IDCANCEL (2) aren't menu events either + if (HIWORD(wParam) != 0 || LOWORD(wParam) <= IDCANCEL) break; runMenuEvent(LOWORD(wParam), uiWindow(w)); return 0; From 6c85f39584801c782275fb387ef360e86fb4159f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 17 Feb 2018 12:56:47 -0500 Subject: [PATCH 2/5] Improved the comment in the previous commit. --- windows/window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/windows/window.cpp b/windows/window.cpp index fbec558b..34baf545 100644 --- a/windows/window.cpp +++ b/windows/window.cpp @@ -87,7 +87,9 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA // not a menu if (lParam != 0) break; - // IDOK (1) and IDCANCEL (2) aren't menu events either + // IsDialogMessage() will also generate IDOK and IDCANCEL when pressing Enter and Escape (respectively) on some controls, like EDIT controls + // swallow those too; they'll cause runMenuEvent() to panic + // TODO fix the root cause somehow if (HIWORD(wParam) != 0 || LOWORD(wParam) <= IDCANCEL) break; runMenuEvent(LOWORD(wParam), uiWindow(w)); From dd54b3da93dd2a701078938288aafd77e163be56 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 17 Feb 2018 12:59:31 -0500 Subject: [PATCH 3/5] And updated the README. Now to pull out a release. --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 01275c0e..deba4dcb 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ This README is being written.
## Announcements +* **17 February 2018** + * The longstanding Enter+Escape crashes on Windows have finally been fixed (thanks to @lxn). + * **Alpha 3.5 is now here.** This is a quickie release primiarly intended to deploy the above fix to package ui itself. More new things will come in the next release, which will also introduce semver (so it will be called v0.4.0 instead). + * **27 November 2016** * Decided to split the table stuff into its own branch. It will be developed independently of everything else, along with a few other features. @@ -42,9 +46,6 @@ This README is being written.
*Note that today's entry (Eastern Time) may be updated later today.* -* ** Date: Sat, 17 Feb 2018 16:44:52 -0500 Subject: [PATCH 4/5] asdf. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index deba4dcb..794a2bf4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This README is being written.
* **17 February 2018** * The longstanding Enter+Escape crashes on Windows have finally been fixed (thanks to @lxn). - * **Alpha 3.5 is now here.** This is a quickie release primiarly intended to deploy the above fix to package ui itself. More new things will come in the next release, which will also introduce semver (so it will be called v0.4.0 instead). + * **Alpha 3.5 is now here.** This is a quickie release primiarly intended to deploy the above fix to package ui itself. **It is a partial binary release; sorry!** More new things will come in the next release, which will also introduce semver (so it will be called v0.4.0 instead). * **27 November 2016** * Decided to split the table stuff into its own branch. It will be developed independently of everything else, along with a few other features. From a245ced3dcb13a45d1107a9e75dec26b08f6d2ad Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 17 Feb 2018 21:25:53 -0500 Subject: [PATCH 5/5] One last overdue README update before the package. Alpha 3.5. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 794a2bf4..d42f7e6b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ This README is being written.
* **17 February 2018** * The longstanding Enter+Escape crashes on Windows have finally been fixed (thanks to @lxn). * **Alpha 3.5 is now here.** This is a quickie release primiarly intended to deploy the above fix to package ui itself. **It is a partial binary release; sorry!** More new things will come in the next release, which will also introduce semver (so it will be called v0.4.0 instead). + * Alpha 3.5 also includes a new control gallery example. The screenshots below have not been updated yet. * **27 November 2016** * Decided to split the table stuff into its own branch. It will be developed independently of everything else, along with a few other features.