| | |
| | | #include <QtGui/QPainter> |
| | | |
| | | #include <QWKCore/qwindowkit_windows.h> |
| | | #include <QWKCore/qwkconfig.h> |
| | | #include <QWKCore/private/nativeeventfilter_p.h> |
| | | |
| | | namespace QWK { |
| | | |
| | | #if QWINDOWKIT_CONFIG(ENABLE_WINDOWS_SYSTEM_BORDER) |
| | | class WidgetBorderHandler : public QObject, public NativeEventFilter { |
| | | public: |
| | | explicit WidgetBorderHandler(QWidget *widget, AbstractWindowContext *ctx) |
| | |
| | | QWidget *widget; |
| | | AbstractWindowContext *ctx; |
| | | }; |
| | | #endif |
| | | |
| | | void WidgetWindowAgentPrivate::setupWindows10BorderWorkaround() { |
| | | #if QWINDOWKIT_CONFIG(ENABLE_WINDOWS_SYSTEM_BORDER) |
| | | // Install painting hook |
| | | auto ctx = context.get(); |
| | | if (ctx->property("needBorderPainter").toBool()) { |
| | | std::ignore = new WidgetBorderHandler(hostWidget, ctx); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | } |