From a1a40b6f61a8d2c23741eb3a1a0bcf7b774a900f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 15 Nov 2026 09:19:39 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Use=20the=20pointer-sized=20wind?= =?UTF-8?q?ow=20call=20on=2064-bit=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SetWindowLong truncates 64-bit window handles, breaking dialog parenting on Win64 builds. --- Client/UGUIPlatformUtils.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Client/UGUIPlatformUtils.pas b/Client/UGUIPlatformUtils.pas index 1bae25a..b0aa99c 100644 --- a/Client/UGUIPlatformUtils.pas +++ b/Client/UGUIPlatformUtils.pas @@ -42,8 +42,12 @@ implementation procedure SetWindowParent(AHandle, AParent: THANDLE); begin {$IFDEF LCLWin32} + {$IFDEF CPU64} + SetWindowLongPtr(AHandle, GWLP_HWNDPARENT, AParent); + {$ELSE} SetWindowLong(AHandle, GWL_HWNDPARENT, AParent); {$ENDIF} + {$ENDIF} {$IFDEF LCLGtk} gtk_window_set_transient_for(PGtkWindow(AHandle), PGtkWindow(AParent)); {$ENDIF}