From 9f5c437a12b90088e61bd88f91b4430dab036a7c Mon Sep 17 00:00:00 2001 From: YuutaW <17158086+Trumeet@users.noreply.github.com> Date: Sun, 30 Jun 2019 18:21:34 -0700 Subject: feat: add an error notification if the window was failed in creating Signed-off-by: Trumeet <17158086+Trumeet@users.noreply.github.com> --- src/mingwMain/kotlin/moe/yuuta/aero/Aero.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mingwMain/kotlin/moe/yuuta/aero/Aero.kt b/src/mingwMain/kotlin/moe/yuuta/aero/Aero.kt index c1f76de..f1040ff 100644 --- a/src/mingwMain/kotlin/moe/yuuta/aero/Aero.kt +++ b/src/mingwMain/kotlin/moe/yuuta/aero/Aero.kt @@ -44,6 +44,12 @@ fun main() { } if (hwnd == null || (forceDialogEnv == "true")) { + if (hwnd == null) { + MessageBoxA(null, + "The system returns an empty dialog (${GetLastError()})", + "Aero", + (MB_OK or MB_ICONERROR).convert()) + } memScoped { // Fallback val dlgImpl = cValue { -- cgit v1.2.3