Merge pull request #25836 from dan-masek:fix_win32_topmost_toggle

Fix #25833: The correct way to disable top-most state is with HWND_NOTOPMOST, not HWND_TOP.
This commit is contained in:
Alexander Smorkalov 2024-07-01 10:30:23 +03:00 committed by GitHub
commit 34ed88d7fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)