From fd8aca4a20f52f696aa239ead1baa20cea5879f6 Mon Sep 17 00:00:00 2001 From: SineStriker <55847490+SineStriker@users.noreply.github.com> Date: 周一, 11 12月 2023 14:58:25 +0800 Subject: [PATCH] Merge pull request #2 from stdware/refactor --- src/core/contexts/abstractwindowcontext.cpp | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/core/contexts/abstractwindowcontext.cpp b/src/core/contexts/abstractwindowcontext.cpp index 71431ff..d60a6c7 100644 --- a/src/core/contexts/abstractwindowcontext.cpp +++ b/src/core/contexts/abstractwindowcontext.cpp @@ -88,7 +88,9 @@ return true; } - void AbstractWindowContext::showSystemMenu(const QPoint &pos){Q_UNUSED(pos)} + void AbstractWindowContext::showSystemMenu(const QPoint &pos) { + virtual_hook(ShowSystemMenuHook, &const_cast<QPoint &>(pos)); + } QRegion AbstractWindowContext::hitTestShape() const { if (hitTestVisibleShapeDirty) { @@ -162,8 +164,17 @@ return true; } - QObject *AbstractWindowContext::target() const { - return m_host; + QString AbstractWindowContext::key() const { + return {}; + } + + void AbstractWindowContext::virtual_hook(int id, void *data) { + switch (id) { + case CentralizeHook: + break; + default: + break; + } } } \ No newline at end of file -- Gitblit v1.9.1