fix: grab focus for installer when opening the error modal

This commit is contained in:
goaaats 2022-06-21 13:15:25 +02:00
parent 7e44a8461f
commit 485eda2c61
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -386,6 +386,10 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
if (this.errorModalOnNextFrame)
{
// NOTE(goat): ImGui cannot open a modal if no window is focused, at the moment.
// If people click out of the installer into the game while a plugin is installing, we won't be able to show a modal if we don't grab focus.
ImGui.SetWindowFocus(this.WindowName);
ImGui.OpenPopup(modalTitle);
this.errorModalOnNextFrame = false;
this.errorModalDrawing = true;