From 147175677d0e0aec68b84f9d18b01bf2af3d53bf Mon Sep 17 00:00:00 2001 From: ts-korhonen Date: Sat, 24 Apr 2021 16:13:21 +0300 Subject: [PATCH] win_opengl: Fix main window staying inactive when clicked. --- src/win/win_opengl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/win/win_opengl.c b/src/win/win_opengl.c index 4a0f9e31b..7230bd303 100644 --- a/src/win/win_opengl.c +++ b/src/win/win_opengl.c @@ -185,8 +185,13 @@ static void handle_window_messages(UINT message, WPARAM wParam, LPARAM lParam, i case WM_LBUTTONDOWN: case WM_MBUTTONUP: case WM_MBUTTONDOWN: + case WM_RBUTTONUP: + case WM_RBUTTONDOWN: if (!fullscreen) { + /* Bring main window to front. */ + SetForegroundWindow(GetAncestor(parent, GA_ROOT)); + /* Mouse events that enter and exit capture. */ PostMessage(parent, message, wParam, lParam); }