2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Fix build for Xcode.

This commit is contained in:
John Preston
2019-06-06 15:01:01 +03:00
parent 0868a9f7b9
commit b674003868
3 changed files with 7 additions and 6 deletions

View File

@@ -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);