From 278b40b766f5a4cddb2af711b90169b11d7f15f9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 1 May 2019 12:19:14 -0600 Subject: [PATCH] include/graphics/nxwidgets/cwidgetcontrol.hxx: Add handshare to getWindowHandle() to avoid returning a NULL handle. But now Twm4Nx hangs waiting for the non-NULL handle, --- include/graphics/nxwidgets/cwidgetcontrol.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/graphics/nxwidgets/cwidgetcontrol.hxx b/include/graphics/nxwidgets/cwidgetcontrol.hxx index 7b970f28e..a4c9e2894 100644 --- a/include/graphics/nxwidgets/cwidgetcontrol.hxx +++ b/include/graphics/nxwidgets/cwidgetcontrol.hxx @@ -667,6 +667,15 @@ namespace NXWidgets inline NXHANDLE getWindowHandle(void) { + // Verify that we have the window handle + + if (m_hWindow == (NXHANDLE)0) + { + // The window handle is saved at the same time as the bounds + + waitBoundsData(); + } + return m_hWindow; }