summaryrefslogtreecommitdiffhomepage
path: root/gui/options-dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-12-06 05:14:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-12-06 05:14:07 +0100
commit4e74d6edef94e4f2f7caae76088f91e9ee993fba (patch)
tree47f6eaf6bc8950b610483df90a4824b4365ae478 /gui/options-dialog.cpp
parent0bd32bf56d5b31e7d7e8288b33f536158903e95e (diff)
gui/keys: allow for pausing global keystrokes for options dialog
Toggling tracking while prompting for toggle tracking key causes a deadlock somewhere.
Diffstat (limited to 'gui/options-dialog.cpp')
-rw-r--r--gui/options-dialog.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index 1edf069d..65407184 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -29,8 +29,12 @@ static QString kopts_to_string(const key_opts& kopts)
return kopts.keycode;
}
-OptionsDialog::OptionsDialog(main_settings& main, std::function<void()> register_global_keys)
- : main(main), register_global_keys(register_global_keys)
+OptionsDialog::OptionsDialog(main_settings& main,
+ std::function<void()> register_global_keys,
+ std::function<void(bool)> pause_keybindings) :
+ main(main),
+ register_global_keys(register_global_keys),
+ pause_keybindings(pause_keybindings)
{
ui.setupUi(this);
@@ -115,7 +119,9 @@ void OptionsDialog::bind_key(key_opts& kopts, QLabel* label)
d.close();
}
});
+ pause_keybindings(true);
d.exec();
+ pause_keybindings(false);
register_global_keys();
label->setText(kopts_to_string(kopts));
delete k;