src/core/contexts/abstractwindowcontext.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/core/contexts/cocoawindowcontext.mm | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/core/contexts/win32windowcontext.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/quick/quickwindowagent.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/widgets/widgetwindowagent.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/core/contexts/abstractwindowcontext.cpp
@@ -230,28 +230,30 @@ if (m_windowHandle) { removeEventFilter(m_windowHandle); } auto oldWindowHandle = m_windowHandle.data(); m_windowHandle = m_delegate->hostWindow(m_host); if (oldWinId != m_windowId) { winIdChanged(m_windowId, oldWinId); } if (m_windowHandle) { m_windowHandle->installEventFilter(this); if (m_windowId) { // Installing twice has no side-effect. m_windowHandle->installEventFilter(this); // Refresh window attributes for (auto it = m_windowAttributesOrder.begin(); it != m_windowAttributesOrder.end();) { if (!windowAttributeChanged(it->first, it->second, {})) { m_windowAttributes.remove(it->first); it = m_windowAttributesOrder.erase(it); continue; // Refresh window attributes for (auto it = m_windowAttributesOrder.begin(); it != m_windowAttributesOrder.end();) { if (!windowAttributeChanged(it->first, it->second, {})) { m_windowAttributes.remove(it->first); it = m_windowAttributesOrder.erase(it); continue; } ++it; } ++it; } } // Send to shared dispatchers if (oldWinId != m_windowId) { // Send to shared dispatchers QEvent e(QEvent::WinIdChange); sharedDispatch(m_host, &e); } @@ -271,18 +273,18 @@ if (!attribute.isValid()) { return true; } if (m_windowHandle && !windowAttributeChanged(key, attribute, {})) { if (m_windowId && !windowAttributeChanged(key, attribute, {})) { return false; } m_windowAttributes.insert(key, m_windowAttributesOrder.insert(m_windowAttributesOrder.end(), std::make_pair(key, attribute))); m_windowAttributes.insert( key, m_windowAttributesOrder.insert(m_windowAttributesOrder.end(), std::make_pair(key, attribute))); return true; } auto &listIter = it.value(); auto &oldAttr = listIter->second; if (m_windowHandle && !windowAttributeChanged(key, attribute, oldAttr)) { if (m_windowId && !windowAttributeChanged(key, attribute, oldAttr)) { return false; } src/core/contexts/cocoawindowcontext.mm
@@ -708,6 +708,8 @@ const QVariant &oldAttribute) { Q_UNUSED(oldAttribute) Q_ASSERT(m_windowId); if (key == QStringLiteral("no-system-buttons")) { if (attribute.type() != QVariant::Bool) return false; @@ -740,7 +742,6 @@ } return ensureWindowProxy(m_windowId)->setBlurEffect(mode); } return false; } src/core/contexts/win32windowcontext.cpp
@@ -916,9 +916,7 @@ Q_UNUSED(oldAttribute) const auto hwnd = reinterpret_cast<HWND>(m_windowId); if (!hwnd) { return false; } Q_ASSERT(hwnd); const DynamicApis &apis = DynamicApis::instance(); const auto &extendMargins = [this, &apis, hwnd]() { src/quick/quickwindowagent.cpp
@@ -44,9 +44,6 @@ return false; } // Make sure the native window handle is actually created before we apply // various hooks. But we don't need the actual window handle so just ignore it. std::ignore = window->winId(); d->setup(window, new QuickItemDelegate()); d->hostWindow = window; src/widgets/widgetwindowagent.cpp
@@ -61,7 +61,7 @@ w->setAttribute(Qt::WA_DontCreateNativeAncestors); // Make sure the native window handle is actually created before we apply // various hooks. w->setAttribute(Qt::WA_NativeWindow); w->setAttribute(Qt::WA_NativeWindow); // ### FIXME: Remove d->setup(w, new WidgetItemDelegate()); d->hostWidget = w;