Decided to disable the initial parent window on Windows. If this causes problems, I can re-enable it later. More TODOs.
This commit is contained in:
parent
812b70f6f0
commit
a34fe03eef
|
@ -40,6 +40,8 @@ static const char *loadLastError(const char *message)
|
|||
wmessage = toUTF16(message);
|
||||
n = _scwprintf(initErrorFormat, initErrorArgs);
|
||||
wstr = (WCHAR *) uiAlloc((n + 1) * sizeof (WCHAR), "WCHAR[]");
|
||||
// TODO this requires -lmsvcr100; find out if that runs on XP RTM/SP1
|
||||
// TODO find replacement
|
||||
swprintf_s(wstr, n + 1, initErrorFormat, initErrorArgs);
|
||||
str = toUTF8(wstr);
|
||||
uiFree(wstr);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "uipriv_windows.h"
|
||||
|
||||
// for maximum safety, all controls that don't have a parent are made children of this, the "initial parent"
|
||||
// it behaves like other containers due to bugs described in container_windows.c, but is never seen and cannot be interacted with by end users
|
||||
// it behaves like other containers due to bugs described in container_windows.c, but is never seen, is disabled, and cannot be interacted with by end users
|
||||
// despite being called the initial parent, it is used whenever a control has no parent, even if it loses its parent at some later point during the execution of the program
|
||||
|
||||
#define uiInitialParentClass L"uiInitialParentClass"
|
||||
|
@ -41,6 +41,8 @@ const char *initInitialParent(HICON hDefaultIcon, HCURSOR hDefaultCursor)
|
|||
if (initialParent == NULL)
|
||||
return "creating initial parent window";
|
||||
|
||||
// TODO disable?
|
||||
// just to be safe, disable the initial parent so it can't be interacted with accidentally
|
||||
// if this causes issues for our controls, we can remove it
|
||||
EnableWindow(initialParent, FALSE);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// 6 april 2015
|
||||
#include "uipriv_windows.h"
|
||||
|
||||
// #qo LDFLAGS: -luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid
|
||||
// #qo LDFLAGS: -luser32 -lkernel32 -lgdi32 -luxtheme -lmsimg32 -lcomdlg32 -lole32 -loleaut32 -loleacc -luuid -lmsvcr100
|
||||
|
||||
static void uimsgloop_else(MSG *msg)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue