| 381 | } |
| 382 | |
| 383 | MainWindow::MainWindow(not_null<Window::Controller*> controller) |
| 384 | : Window::MainWindow(controller) |
| 385 | , _private(std::make_unique<Private>(this)) |
| 386 | , _taskbarHiderWindow(std::make_unique<QWindow>()) { |
| 387 | qApp->installNativeEventFilter(&_private->filter); |
| 388 | |
| 389 | setupNativeWindowFrame(); |
| 390 | |
| 391 | SetWindowPriority(this, controller->isPrimary() ? 2 : 1); |
| 392 | |
| 393 | using namespace rpl::mappers; |
| 394 | Core::App().appDeactivatedValue( |
| 395 | ) | rpl::distinct_until_changed( |
| 396 | ) | rpl::filter(_1) | rpl::on_next([=] { |
| 397 | _lastDeactivateTime = crl::now(); |
| 398 | }, lifetime()); |
| 399 | |
| 400 | setupPreviewPasscodeLock(); |
| 401 | } |
| 402 | |
| 403 | void MainWindow::setupPreviewPasscodeLock() { |
| 404 | Core::App().passcodeLockValue( |
nothing calls this directly
no test coverage detected