mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 14:38:01 +02:00
lcl: set PopupMode to pmAuto to fix problems with showing input/message/question dialogs to users from StayOnTop forms
win32: fix ShowModal of child forms which has WS_EX_TOPMOST parent git-svn-id: trunk@28200 -
This commit is contained in:
parent
06f15d8c61
commit
511b386b50
@ -41,6 +41,7 @@ begin
|
||||
Form.CreateNew(nil, 0);
|
||||
with Form do
|
||||
begin
|
||||
PopupMode := pmAuto;
|
||||
BorderStyle := bsDialog;
|
||||
Caption := InputCaption;
|
||||
Position := poScreenCenter;
|
||||
|
@ -182,6 +182,7 @@ begin
|
||||
//debugln('TPromptDialog.CreateMessageDialog A ButtonCount=',dbgs(ButtonCount));
|
||||
|
||||
ControlStyle:= ControlStyle-[csSetCaption];
|
||||
PopupMode := pmAuto;
|
||||
BorderStyle := bsDialog;
|
||||
Position := poScreenCenter;
|
||||
SetInitialBounds(0,0,200,100);
|
||||
@ -794,7 +795,7 @@ var
|
||||
IsDefault: Boolean;
|
||||
begin
|
||||
inherited Create(nil);
|
||||
|
||||
PopupMode := pmAuto;
|
||||
BorderStyle := bsDialog;
|
||||
Position := poScreenCenter;
|
||||
MessageTxt := ConvertLineEndings(aMsg);
|
||||
|
@ -661,8 +661,14 @@ begin
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomForm.ShowModal(const ACustomForm: TCustomForm);
|
||||
var
|
||||
Parent: HWND;
|
||||
begin
|
||||
BringWindowToTop(ACustomForm.Handle);
|
||||
Parent := GetParent(ACustomForm.Handle);
|
||||
if (Parent <> 0) and (GetWindowLong(Parent, GWL_EXSTYLE) and WS_EX_TOPMOST <> 0) then
|
||||
SetWindowPos(ACustomForm.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE)
|
||||
else
|
||||
BringWindowToTop(ACustomForm.Handle);
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomForm.SetAlphaBlend(const ACustomForm: TCustomForm;
|
||||
|
Loading…
Reference in New Issue
Block a user