🚨 Use the pointer-sized window call on 64-bit Windows
SetWindowLong truncates 64-bit window handles, breaking dialog parenting on Win64 builds.
This commit is contained in:
@@ -42,8 +42,12 @@ implementation
|
|||||||
procedure SetWindowParent(AHandle, AParent: THANDLE);
|
procedure SetWindowParent(AHandle, AParent: THANDLE);
|
||||||
begin
|
begin
|
||||||
{$IFDEF LCLWin32}
|
{$IFDEF LCLWin32}
|
||||||
|
{$IFDEF CPU64}
|
||||||
|
SetWindowLongPtr(AHandle, GWLP_HWNDPARENT, AParent);
|
||||||
|
{$ELSE}
|
||||||
SetWindowLong(AHandle, GWL_HWNDPARENT, AParent);
|
SetWindowLong(AHandle, GWL_HWNDPARENT, AParent);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$ENDIF}
|
||||||
{$IFDEF LCLGtk}
|
{$IFDEF LCLGtk}
|
||||||
gtk_window_set_transient_for(PGtkWindow(AHandle), PGtkWindow(AParent));
|
gtk_window_set_transient_for(PGtkWindow(AHandle), PGtkWindow(AParent));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|||||||
Reference in New Issue
Block a user