Allow arbitrary window now+delayed activation.

This commit is contained in:
John Preston 2023-05-19 20:47:19 +04:00
parent 303a07f946
commit f86d876eff
2 changed files with 8 additions and 0 deletions

View file

@ -38,6 +38,13 @@ bool Unpause(bool force = false) {
} // namespace } // namespace
void ActivateWindow(not_null<QWidget*> widget) {
const auto window = widget->window();
window->raise();
window->activateWindow();
ActivateWindowDelayed(window);
}
void ActivateWindowDelayed(not_null<QWidget*> widget) { void ActivateWindowDelayed(not_null<QWidget*> widget) {
if (Paused) { if (Paused) {
Attempted = true; Attempted = true;

View file

@ -8,6 +8,7 @@
namespace Ui { namespace Ui {
void ActivateWindow(not_null<QWidget*> widget);
void ActivateWindowDelayed(not_null<QWidget*> widget); void ActivateWindowDelayed(not_null<QWidget*> widget);
void PreventDelayedActivation(); void PreventDelayedActivation();