Block input updates while swkbd is open in foreground mode
This commit is contained in:
parent
2ddd3dd4a7
commit
2edd862433
2 changed files with 5 additions and 0 deletions
|
@ -107,6 +107,8 @@ namespace Ryujinx.UI.Applet
|
||||||
swkbdDialog.SetInputLengthValidation(args.StringLengthMin, args.StringLengthMax);
|
swkbdDialog.SetInputLengthValidation(args.StringLengthMin, args.StringLengthMax);
|
||||||
swkbdDialog.SetInputValidation(args.KeyboardMode);
|
swkbdDialog.SetInputValidation(args.KeyboardMode);
|
||||||
|
|
||||||
|
((MainWindow)_parent).RendererWidget.NpadManager.BlockInputUpdates();
|
||||||
|
|
||||||
if (swkbdDialog.Run() == (int)ResponseType.Ok)
|
if (swkbdDialog.Run() == (int)ResponseType.Ok)
|
||||||
{
|
{
|
||||||
inputText = swkbdDialog.InputEntry.Text;
|
inputText = swkbdDialog.InputEntry.Text;
|
||||||
|
@ -128,6 +130,7 @@ namespace Ryujinx.UI.Applet
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogCloseEvent.WaitOne();
|
dialogCloseEvent.WaitOne();
|
||||||
|
((MainWindow)_parent).RendererWidget.NpadManager.UnblockInputUpdates();
|
||||||
|
|
||||||
userText = error ? null : inputText;
|
userText = error ? null : inputText;
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
_parent.ViewModel.AppHost.NpadManager.BlockInputUpdates();
|
||||||
var response = await SwkbdAppletDialog.ShowInputDialog(LocaleManager.Instance[LocaleKeys.SoftwareKeyboard], args);
|
var response = await SwkbdAppletDialog.ShowInputDialog(LocaleManager.Instance[LocaleKeys.SoftwareKeyboard], args);
|
||||||
|
|
||||||
if (response.Result == UserResult.Ok)
|
if (response.Result == UserResult.Ok)
|
||||||
|
@ -143,6 +144,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogCloseEvent.WaitOne();
|
dialogCloseEvent.WaitOne();
|
||||||
|
_parent.ViewModel.AppHost.NpadManager.UnblockInputUpdates();
|
||||||
|
|
||||||
userText = error ? null : inputText;
|
userText = error ? null : inputText;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue