From 2f6c83c095724bbba0f43b2f2893ba73c17949a6 Mon Sep 17 00:00:00 2001 From: Zhao Yuhang <2546789017@qq.com> Date: 周一, 11 12月 2023 21:57:40 +0800 Subject: [PATCH] add quick border --- src/core/contexts/abstractwindowcontext.cpp | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/core/contexts/abstractwindowcontext.cpp b/src/core/contexts/abstractwindowcontext.cpp index 18ed37f..49eb0c5 100644 --- a/src/core/contexts/abstractwindowcontext.cpp +++ b/src/core/contexts/abstractwindowcontext.cpp @@ -181,20 +181,15 @@ void AbstractWindowContext::virtual_hook(int id, void *data) { switch (id) { - case ShowSystemMenuHook: { - const auto &pos = *reinterpret_cast<const QPoint *>(data); - std::ignore = pos; - return; - } case NeedsDrawBordersHook: { - auto &result = *reinterpret_cast<bool *>(data); + auto &result = *static_cast<bool *>(data); result = false; return; } case DrawBordersHook: { - auto args = reinterpret_cast<void **>(data); - auto &painter = *reinterpret_cast<QPainter *>(args[0]); - auto &rect = *reinterpret_cast<const QRect *>(args[1]); + auto args = static_cast<void **>(data); + auto &painter = *static_cast<QPainter *>(args[0]); + const auto &rect = *static_cast<const QRect *>(args[1]); // Top painter.setPen(kSampleColorSet.grass); -- Gitblit v1.9.1