summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2019-04-09 20:06:45 -0400
committerGravatar Lioncash2019-04-09 20:06:49 -0400
commite1101d3e20ef976b4cbc78ae30c2565e8911fe73 (patch)
treef61762d57645c4ecc66aa49854538e38ba231c99
parentconfigure_hotkeys: Avoid dialog memory leak within Configure() (diff)
downloadyuzu-e1101d3e20ef976b4cbc78ae30c2565e8911fe73.tar.gz
yuzu-e1101d3e20ef976b4cbc78ae30c2565e8911fe73.tar.xz
yuzu-e1101d3e20ef976b4cbc78ae30c2565e8911fe73.zip
configure_hotkeys: Pass the dialog as a parent to SequenceDialog()
Without passing in a parent, this can result in focus being stolen from the dialog in certain cases. Example: On Windows, if the logging window is left open, the logging Window will potentially get focus over the hotkey dialog itself, since it brings all open windows for the application into view. By specifying a parent, we only bring windows for the parent into view (of which there are none, aside from the hotkey dialog).
-rw-r--r--src/yuzu/configuration/configure_hotkeys.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp
index 31347ce5a..a7a8752e5 100644
--- a/src/yuzu/configuration/configure_hotkeys.cpp
+++ b/src/yuzu/configuration/configure_hotkeys.cpp
@@ -74,7 +74,7 @@ void ConfigureHotkeys::Configure(QModelIndex index) {
74 auto* const model = ui->hotkey_list->model(); 74 auto* const model = ui->hotkey_list->model();
75 const auto previous_key = model->data(index); 75 const auto previous_key = model->data(index);
76 76
77 SequenceDialog hotkey_dialog; 77 SequenceDialog hotkey_dialog{this};
78 78
79 const int return_code = hotkey_dialog.exec(); 79 const int return_code = hotkey_dialog.exec();
80 const auto key_sequence = hotkey_dialog.GetSequence(); 80 const auto key_sequence = hotkey_dialog.GetSequence();