From 4186441ba3c6e4cd0f986d1e806fdb72bb60be2d Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 10 Mar 2025 00:18:10 +0100 Subject: [PATCH] Win32: Prevent Splitter from activating the "resize bar" window. Avoid focus changes to the form, or its components. Issue #41506 Patch by Lipinast Lekrisov (cherry picked from commit 12afdd137b5bedc5388136fe28be2072224e2f18) --- lcl/interfaces/win32/win32lclintf.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/win32/win32lclintf.inc b/lcl/interfaces/win32/win32lclintf.inc index ec84324578..e628900305 100644 --- a/lcl/interfaces/win32/win32lclintf.inc +++ b/lcl/interfaces/win32/win32lclintf.inc @@ -284,15 +284,17 @@ begin if WindowsVersion >= wv2000 then begin Result := CreateWindowEx(WS_EX_LAYERED or WS_EX_TRANSPARENT or WS_EX_TOPMOST or WS_EX_TOOLWINDOW, - PChar(WndClassName), PChar(WndClassName), WS_POPUP or WS_VISIBLE, + PChar(WndClassName), PChar(WndClassName), WS_POPUP, ARect.Left, ARect.Top, ARect.Right - ARect.Left, ARect.Bottom - ARect.Top, AppHandle, 0, System.HInstance, nil); SetLayeredWindowAttributes(Result, 0, $30, LWA_ALPHA); end else Result := CreateWindowEx(WS_EX_TOPMOST or WS_EX_TOOLWINDOW, - PChar(WndClassName), PChar(WndClassName), WS_POPUP or WS_VISIBLE, + PChar(WndClassName), PChar(WndClassName), WS_POPUP, ARect.Left, ARect.Top, ARect.Right - ARect.Left, ARect.Bottom - ARect.Top, AppHandle, 0, System.HInstance, nil); + + ShowWindow(Result, SW_SHOWNOACTIVATE); end; {------------------------------------------------------------------------------