diff --git a/lcl/editbtn.pas b/lcl/editbtn.pas index 6f1afec918..d7a964c9a5 100644 --- a/lcl/editbtn.pas +++ b/lcl/editbtn.pas @@ -934,14 +934,14 @@ begin Result := ResBtnCalendar; end; -procedure TDateEdit.DoButtonClick(Sender:TObject);//or onClick +procedure TDateEdit.DoButtonClick(Sender: TObject);//or onClick var - PopupOrigin:TPoint; + PopupOrigin: TPoint; begin inherited DoButtonClick(Sender); - PopupOrigin:=ControlToScreen(Point(0, Height)); - if Trim(Text)=EmptyStr then + PopupOrigin := ControlToScreen(Point(0, Height)); + if Trim(Text) = EmptyStr then ShowCalendarPopup(PopupOrigin, Now, @CalendarPopupReturnDate) else ShowCalendarPopup(PopupOrigin, Date, @CalendarPopupReturnDate) diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index 95c23db1cb..3f165cdae2 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -879,15 +879,18 @@ end; ------------------------------------------------------------------------------} procedure TCustomForm.SetZOrder(Topmost: Boolean); begin - if Parent=nil then begin - if TopMost and HandleAllocated then begin - if (Screen.GetCurrentModalForm<>nil) - and (Screen.GetCurrentModalForm<>Self) then exit; + if Parent = nil then + begin + if TopMost and HandleAllocated then + begin + if (Screen.GetCurrentModalForm <> nil) and (Screen.GetCurrentModalForm <> Self) then + Exit; //TODO: call TWSCustomFormClass(Widgetset).SetZORder. Screen.MoveFormToZFront(Self); SetForegroundWindow(Handle); end; - end else + end + else inherited SetZOrder(Topmost); end; diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index fea462c005..a5951b2581 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -3088,11 +3088,13 @@ end; ------------------------------------------------------------------------------} function TWin32WidgetSet.SetFocus(HWnd: HWND): HWND; begin -{ if Windows.GetFocus <> HWnd then +{ + if Windows.GetFocus <> HWnd then begin - DebugLn(['TWin32WidgetSet.SetFocus ']); + DebugLn(['TWin32WidgetSet.SetFocus ', ' Wnd = ', WndClassName(HWnd)]); DumpStack; - end;} + end; +} Result := Windows.SetFocus(HWnd); end; diff --git a/lcl/lclproc.pas b/lcl/lclproc.pas index d93ce87d8a..cd3616cccc 100644 --- a/lcl/lclproc.pas +++ b/lcl/lclproc.pas @@ -1513,10 +1513,10 @@ begin end; procedure DumpStack; -Begin - if assigned(DebugText) then +begin + if Assigned(DebugText) then Dump_Stack(DebugText^, get_frame); -End; +end; function GetStackTrace(UseCache: boolean): string; var