diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-05-23 12:24:13 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-07-31 09:54:03 +0100 |
commit | c1f841cf9a45ad01e80195806fd4c0739d5180a5 (patch) | |
tree | 0860d08532a7fea9e20c30faa30e38b0f3b67b66 /src/corelib | |
parent | b74b9e8451081eba5877aded54f2986979cbafcc (diff) | |
download | fpGUI-c1f841cf9a45ad01e80195806fd4c0739d5180a5.tar.xz |
TfpgGDIWindow.ActivateWindow now uses SetWindowPos instead of SetForegroundWindow.
The code and intent seems to be correct, but even though I set the flag
SWP_NOZORDER (so the behaviour is consistent with Linux X11), Windows
seems to ignore that flag and still bring the active window to the
front.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/gdi/fpg_gdi.pas | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas index 2bbdd389..d5e2bf19 100644 --- a/src/corelib/gdi/fpg_gdi.pas +++ b/src/corelib/gdi/fpg_gdi.pas @@ -2033,7 +2033,10 @@ end; procedure TfpgGDIWindow.ActivateWindow; begin - SetForegroundWindow(FWinHandle); + Windows.SetWindowPos( + WinHandle, HWND_NOTOPMOST, + FLeft, FTop, FWidth, FHeight, + SWP_NOZORDER or SWP_NOSIZE); end; procedure TfpgGDIWindow.CaptureMouse; |