From dec34d131a925ede768fd6c6f167522cfda9645f Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <zhaoyuhang@rankyee.com>
Date: 摹曛, 07 12月 2023 18:01:28 +0800
Subject: [PATCH] a little simplify

---
 src/core/contexts/win32windowcontext.cpp |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp
index af62e4c..0703351 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -553,12 +553,7 @@
 
         // Try hooked procedure and save result
         LRESULT result;
-        bool handled = ctx->windowProc(hWnd, message, wParam, lParam, &result);
-
-        // TODO: Determine whether to show system menu
-        // ...
-
-        if (handled) {
+        if (ctx->windowProc(hWnd, message, wParam, lParam, &result)) {
             return result;
         }
 
@@ -631,6 +626,10 @@
             return false;
         }
 
+        if (systemMenuHandler(hWnd, message, wParam, lParam, result)) {
+            return true;
+        }
+
         // Test snap layout
         if (snapLayoutHandler(hWnd, message, wParam, lParam, result)) {
             return true;

--
Gitblit v1.9.1