Skip to content

Commit 94cb6d4

Browse files
committed
Simplify ShowXamlWindow.
1 parent ad759a8 commit 94cb6d4

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

NanaBox/Utils.cpp

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -335,27 +335,7 @@ int ShowXamlWindow(
335335
::ShowWindow(WindowHandle, SW_SHOW);
336336
::UpdateWindow(WindowHandle);
337337

338-
MSG Message;
339-
while (::GetMessageW(&Message, nullptr, 0, 0))
340-
{
341-
// Workaround for capturing Alt+F4 in applications with XAML Islands.
342-
// Reference: https://github.com/microsoft/microsoft-ui-xaml/issues/2408
343-
if (Message.message == WM_SYSKEYDOWN && Message.wParam == VK_F4)
344-
{
345-
::SendMessageW(
346-
::GetAncestor(Message.hwnd, GA_ROOT),
347-
Message.message,
348-
Message.wParam,
349-
Message.lParam);
350-
351-
continue;
352-
}
353-
354-
::TranslateMessage(&Message);
355-
::DispatchMessageW(&Message);
356-
}
357-
358-
return static_cast<int>(Message.wParam);
338+
return ::MileXamlContentWindowDefaultMessageLoop();
359339
}
360340

361341
int ShowXamlDialog(

0 commit comments

Comments
 (0)