Skip to content

Commit 34d61b5

Browse files
authored
Disable system context menu (#2886)
Fixes issue #2885
1 parent 1fdbfec commit 34d61b5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Client/core/CMessageLoopHook.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@ LRESULT CALLBACK CMessageLoopHook::ProcessMessage(HWND hwnd, UINT uMsg, WPARAM w
185185
return 0;
186186
}
187187

188+
// Disable the system context menu by clicking on window bar (freezes the game).
189+
// Disable right mouse button outside application window area (holding it over window bar freezes the game).
190+
if (uMsg == WM_CONTEXTMENU || uMsg == WM_NCRBUTTONDOWN)
191+
{
192+
return 0;
193+
}
194+
188195
// Quit message?
189196
if (uMsg == WM_CLOSE)
190197
{

0 commit comments

Comments
 (0)