fix key press on windows activated

This commit is contained in:
2019-01-18 23:51:06 +01:00
parent d019c2467e
commit c62b81f2b9

View File

@@ -828,6 +828,21 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
tasklist.emplace_back([=] {
int active = GET_WM_ACTIVATE_STATE(wp, lp);
WacomTablet::I.set_focus(active);
for (int k = 0; k < 256; k++)
{
if (App::I.keys[k])
{
for (int i = 0; i < 256; i++)
{
if ((int)convert_key(i) == k)
{
bool down = GetKeyState(i) & 0x8000;
if (!down)
App::I.key_up((kKey)k);
}
}
}
}
});
break;
}