summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/corelib/gdi/fpg_gdi.pas5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index 59c9731c..2bbdd389 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -2058,7 +2058,10 @@ end;
procedure TfpgGDIWindow.BringToFront;
begin
if HasHandle then
- BringWindowToTop(FWinHandle);
+ Windows.SetWindowPos(
+ WinHandle, HWND_TOP,
+ FLeft, FTop, FWidth, FHeight,
+ SWP_NOACTIVATE or SWP_NOSIZE);
end;
function TfpgGDIWindow.HandleIsValid: boolean;