Allow arbitrary window now+delayed activation.
This commit is contained in:
parent
303a07f946
commit
f86d876eff
2 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue