From 1e5407a9ba571c8aedceaf0c2897f915dd98d925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Ma=C5=A1ek?= Date: Sat, 29 Jun 2024 21:39:49 +0200 Subject: [PATCH] Fix #25833: The correct way to disable top-most state is with HWND_NOTOPMOST, not HWND_TOP. --- modules/highgui/src/window_w32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index 32b2392904..381c9f52a4 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -681,7 +681,7 @@ void cvSetPropTopmost_W32(const char* name, const bool topmost) static bool setPropTopmost_(CvWindow& window, bool topmost) { - HWND flag = topmost ? HWND_TOPMOST : HWND_TOP; + HWND flag = topmost ? HWND_TOPMOST : HWND_NOTOPMOST; BOOL success = SetWindowPos(window.frame, flag, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); if (!success)