diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-10 09:19:42 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-10 09:19:42 +0000 |
commit | ba11bd599d1ddf7a1e2e2703edd16b5dd513477e (patch) | |
tree | 505776cdfeb9c8de6899dbf55be9b49b31285b36 /src/corelib/gdi | |
parent | e98eebf9c9745228b76319d615ca6ee4a62a0f6f (diff) | |
download | fpGUI-ba11bd599d1ddf7a1e2e2703edd16b5dd513477e.tar.xz |
* Applied the solution from Vladimir so that ComboBox dropdown doesn't steal focus under GDI.
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r-- | src/corelib/gdi/gfx_gdi.pas | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas index 05ed1af2..4ebe5400 100644 --- a/src/corelib/gdi/gfx_gdi.pas +++ b/src/corelib/gdi/gfx_gdi.pas @@ -1097,8 +1097,10 @@ begin end else if FWindowType in [wtPopup] then begin - FWinStyle := WS_POPUP; - FWinStyleEx := WS_EX_TOOLWINDOW; + // This prevents the popup window from stealing the focus. eg: ComboBox dropdown + FParentWinHandle := GetDesktopWindow; + FWinStyle := WS_CHILD; + FWinStyleEx := WS_EX_TOPMOST or WS_EX_TOOLWINDOW; end; if FWindowType = wtModalForm then |