Aric Stewart aric@codeweavers.com writes:
@@ -2323,12 +2323,18 @@ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
if (data->imeWnd == NULL) {
/* create the ime window */
data->imeWnd = CreateWindowExW( WS_EX_TOOLWINDOW,
data->immKbd->imeClassName, NULL, WS_POPUP, 0, 0, 1, 1, 0,
0, data->immKbd->hIME, 0);
SetWindowLongPtrW(data->imeWnd, IMMGWL_IMC, (LONG_PTR)data);
IMM_GetThreadData()->hwndDefault = data->imeWnd;
HWND def = IMM_GetThreadData()->hwndDefault;
if (def == NULL)
{
/* create the ime window */
data->imeWnd = CreateWindowExW( WS_EX_TOOLWINDOW,
data->immKbd->imeClassName, NULL, WS_POPUP, 0, 0, 1, 1, 0,
0, data->immKbd->hIME, 0);
SetWindowLongPtrW(data->imeWnd, IMMGWL_IMC, (LONG_PTR)data);
IMM_GetThreadData()->hwndDefault = data->imeWnd;
}
else
data->imeWnd = def;
So what happens to the window if the first IMC is destroyed?
On 9/25/12 1:38 PM, Alexandre Julliard wrote:
Aric Stewart aric@codeweavers.com writes:
@@ -2323,12 +2323,18 @@ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
if (data->imeWnd == NULL) {
/* create the ime window */
data->imeWnd = CreateWindowExW( WS_EX_TOOLWINDOW,
data->immKbd->imeClassName, NULL, WS_POPUP, 0, 0, 1, 1, 0,
0, data->immKbd->hIME, 0);
SetWindowLongPtrW(data->imeWnd, IMMGWL_IMC, (LONG_PTR)data);
IMM_GetThreadData()->hwndDefault = data->imeWnd;
HWND def = IMM_GetThreadData()->hwndDefault;
if (def == NULL)
{
/* create the ime window */
data->imeWnd = CreateWindowExW( WS_EX_TOOLWINDOW,
data->immKbd->imeClassName, NULL, WS_POPUP, 0, 0, 1, 1, 0,
0, data->immKbd->hIME, 0);
SetWindowLongPtrW(data->imeWnd, IMMGWL_IMC, (LONG_PTR)data);
IMM_GetThreadData()->hwndDefault = data->imeWnd;
}
else
data->imeWnd = def;
So what happens to the window if the first IMC is destroyed?
The window should stick around until the thread data is destroyed. Theoretically the IMC that has this window is the default one for the thread. Which cannot be destroyed until the thread data is destroyed.
I see the issue you are worried about and I will work to resolve that. -aric