From 09287f3d9e9e88271de2bfd5388dae5a53e8c6f5 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 摹曛, 07 12月 2023 15:03:24 +0800
Subject: [PATCH] Add host event filter

---
 src/core/contexts/abstractwindowcontext_p.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/core/contexts/abstractwindowcontext_p.h b/src/core/contexts/abstractwindowcontext_p.h
index a73f7c4..30ea3c1 100644
--- a/src/core/contexts/abstractwindowcontext_p.h
+++ b/src/core/contexts/abstractwindowcontext_p.h
@@ -20,7 +20,7 @@
         ~AbstractWindowContext() override;
 
     public:
-        virtual bool setup(QObject *host, WindowItemDelegate *delegate);
+        bool setup(QObject *host, WindowItemDelegate *delegate);
 
         inline QObject *host() const;
         inline QWindow *window() const;
@@ -42,6 +42,10 @@
         bool isInTitleBarDraggableArea(const QPoint &pos) const;
 
     protected:
+        virtual bool setupHost() = 0;
+        virtual bool hostEventFilter(QEvent *event);
+
+    protected:
         QObject *m_host;
         std::unique_ptr<WindowItemDelegate> m_delegate;
         QWindow *m_windowHandle;

--
Gitblit v1.9.1