mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-28 03:20:57 +00:00
Fix build for Xcode.
This commit is contained in:
parent
0868a9f7b9
commit
b674003868
@ -1060,10 +1060,10 @@ QPoint Application::getPointForCallPanelCenter() const {
|
||||
// macOS Qt bug workaround, sometimes no leaveEvent() gets to the nested widgets.
|
||||
void Application::registerLeaveSubscription(QWidget *widget) {
|
||||
#ifdef Q_OS_MAC
|
||||
if (auto topLevel = widget->window()) {
|
||||
if (topLevel == _window.get()) {
|
||||
if (const auto topLevel = widget->window()) {
|
||||
if (topLevel == _window->widget()) {
|
||||
auto weak = make_weak(widget);
|
||||
auto subscription = _window->leaveEvents(
|
||||
auto subscription = _window->widget()->leaveEvents(
|
||||
) | rpl::start_with_next([weak] {
|
||||
if (const auto window = weak.data()) {
|
||||
QEvent ev(QEvent::Leave);
|
||||
|
@ -39,6 +39,8 @@ public:
|
||||
|
||||
void updateWindowIcon() override;
|
||||
|
||||
class Private;
|
||||
|
||||
public slots:
|
||||
void psShowTrayMenu();
|
||||
|
||||
@ -82,7 +84,6 @@ protected:
|
||||
void closeWithoutDestroy() override;
|
||||
|
||||
private:
|
||||
class Private;
|
||||
friend class Private;
|
||||
|
||||
void initTouchBar();
|
||||
|
@ -643,7 +643,7 @@ void MainWindow::createGlobalMenu() {
|
||||
psContacts = window->addAction(lang(lng_mac_menu_contacts));
|
||||
connect(psContacts, &QAction::triggered, psContacts, crl::guard(this, [=] {
|
||||
if (isHidden()) {
|
||||
showFromTray();
|
||||
App::wnd()->showFromTray();
|
||||
}
|
||||
if (!account().sessionExists()) {
|
||||
return;
|
||||
@ -652,7 +652,7 @@ void MainWindow::createGlobalMenu() {
|
||||
box->addButton(langFactory(lng_close), [box] { box->closeBox(); });
|
||||
box->addLeftButton(langFactory(lng_profile_add_contact), [] { App::wnd()->onShowAddContact(); });
|
||||
}));
|
||||
});
|
||||
}));
|
||||
psAddContact = window->addAction(lang(lng_mac_menu_add_contact), App::wnd(), SLOT(onShowAddContact()));
|
||||
window->addSeparator();
|
||||
psNewGroup = window->addAction(lang(lng_mac_menu_new_group), App::wnd(), SLOT(onShowNewGroup()));
|
||||
|
Loading…
Reference in New Issue
Block a user