Replace call_delayed with InvokeQueued in MainWindow::handleVisibleChanged

This commit is contained in:
Ilya Fedin 2021-05-13 14:12:05 +04:00 committed by John Preston
parent 30d8894c30
commit cfee688feb
1 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/window_controller.h" #include "window/window_controller.h"
#include "window/window_session_controller.h" #include "window/window_session_controller.h"
#include "base/platform/base_platform_info.h" #include "base/platform/base_platform_info.h"
#include "base/call_delayed.h" #include "base/invoke_queued.h"
#include "ui/widgets/popup_menu.h" #include "ui/widgets/popup_menu.h"
#include "ui/widgets/input_fields.h" #include "ui/widgets/input_fields.h"
#include "facades.h" #include "facades.h"
@ -1270,7 +1270,7 @@ void MainWindow::updateGlobalMenuHook() {
void MainWindow::handleVisibleChangedHook(bool visible) { void MainWindow::handleVisibleChangedHook(bool visible) {
if (visible) { if (visible) {
base::call_delayed(1, this, [=] { InvokeQueued(this, [=] {
SkipTaskbar( SkipTaskbar(
windowHandle(), windowHandle(),
(Global::WorkMode().value() == dbiwmTrayOnly) (Global::WorkMode().value() == dbiwmTrayOnly)
@ -1281,7 +1281,7 @@ void MainWindow::handleVisibleChangedHook(bool visible) {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
if (_appMenuSupported && _mainMenuExporter) { if (_appMenuSupported && _mainMenuExporter) {
if (visible) { if (visible) {
base::call_delayed(1, this, [=] { InvokeQueued(this, [=] {
RegisterAppMenu(windowHandle(), kMainMenuObjectPath.utf16()); RegisterAppMenu(windowHandle(), kMainMenuObjectPath.utf16());
}); });
} else { } else {