mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 05:19:31 +02:00
Qt: Fixed endless loop problem with TQtWidgetSet.FocusChanged hook, removed workaround.
git-svn-id: trunk@15043 -
This commit is contained in:
parent
d2d5ce2407
commit
79f610efff
@ -329,12 +329,6 @@ begin
|
||||
end;
|
||||
if NewWidget <> nil then
|
||||
begin
|
||||
// workaround. when form get focus it set focus to ActiveControl
|
||||
// qt in some cases wants to return focus back to form => we have endless loop
|
||||
if (NewWidget.LCLObject is TCustomForm) and
|
||||
(OldWidget <> nil) and
|
||||
(GetParentForm(OldWidget.LCLObject) = NewWidget.LCLObject) then
|
||||
Exit;
|
||||
//WriteLn('SET: ', NewWidget.LCLObject.ClassName);
|
||||
Msg.msg := LM_SETFOCUS;
|
||||
Msg.wParam := PtrUInt(OldWidget);
|
||||
|
@ -188,7 +188,11 @@ begin
|
||||
if (TCustomForm(AWinControl).FormStyle in [fsMDIChild]) and
|
||||
(Application.MainForm.FormStyle = fsMdiForm) and
|
||||
not (csDesigning in AWinControl.ComponentState) then
|
||||
begin
|
||||
QMdiArea_addSubWindow(TQtMainWindow(Application.MainForm.Handle).MDIAreaHandle, QtMainWindow.Widget, QtWindow);
|
||||
QWidget_setFocusProxy(QtMainWindow.Widget, QtMainWindow.getContainerWidget);
|
||||
end;
|
||||
|
||||
|
||||
// Return the handle
|
||||
Result := TLCLIntfHandle(QtMainWindow);
|
||||
|
Loading…
Reference in New Issue
Block a user