From 9619357769518e277237812e82d7c32d38cb20e6 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周日, 17 12月 2023 00:23:05 +0800 Subject: [PATCH] Optimize Qt and Cocoa context --- src/widgets/widgetwindowagent.cpp | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/widgets/widgetwindowagent.cpp b/src/widgets/widgetwindowagent.cpp index fc21be4..af15481 100644 --- a/src/widgets/widgetwindowagent.cpp +++ b/src/widgets/widgetwindowagent.cpp @@ -57,6 +57,9 @@ if (!d->context->setTitleBar(w)) { return; } +#ifdef Q_OS_MACOS + d->setupMacOSTitleBar(w); +#endif Q_EMIT titleBarWidgetChanged(w); } @@ -81,11 +84,6 @@ void WidgetWindowAgent::setHitTestVisible(const QWidget *w, bool visible) { Q_D(WidgetWindowAgent); d->context->setHitTestVisible(w, visible); - } - - void WidgetWindowAgent::setHitTestVisible(const QRect &rect, bool visible) { - Q_D(WidgetWindowAgent); - d->context->setHitTestVisible(rect, visible); } WidgetWindowAgent::WidgetWindowAgent(WidgetWindowAgentPrivate &d, QObject *parent) -- Gitblit v1.9.1