mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 10:29:26 +02:00
Qt: moved TQtMainWindow specific events to TQtMainWindow.EventFilter(), fixed MDI windows activation order.
git-svn-id: trunk@23541 -
This commit is contained in:
parent
1bc6b10b9e
commit
0a03e94890
@ -1807,20 +1807,6 @@ begin
|
||||
if LCLObject <> nil then
|
||||
begin
|
||||
case QEvent_type(Event) of
|
||||
QEventWindowActivate: SlotActivateWindow(True);
|
||||
QEventWindowDeactivate: SlotActivateWindow(False);
|
||||
QEventShowToParent:
|
||||
begin
|
||||
if (Self is TQtMainWindow) and (TQtMainWindow(Self).IsMdiChild) then
|
||||
begin
|
||||
if not TCustomForm(LCLObject).Active then
|
||||
begin
|
||||
SlotActivateWindow(True);
|
||||
Result := True;
|
||||
QEvent_ignore(Event);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
QEventShow: SlotShow(True);
|
||||
QEventHide: SlotShow(False);
|
||||
QEventClose:
|
||||
@ -4262,6 +4248,7 @@ begin
|
||||
if p <> nil then
|
||||
QMdiArea_setBackground(MdiAreaHandle, QPalette_background(P));
|
||||
QWidget_setParent(MdiAreaHandle, FCentralWidget);
|
||||
QMdiArea_setActivationOrder(MdiAreaHandle, QMdiAreaActivationHistoryOrder);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -4391,6 +4378,21 @@ begin
|
||||
|
||||
BeginEventProcessing;
|
||||
case QEvent_type(Event) of
|
||||
QEventWindowActivate: SlotActivateWindow(True);
|
||||
QEventWindowDeactivate: SlotActivateWindow(False);
|
||||
QEventShowToParent:
|
||||
begin
|
||||
if (Self is TQtMainWindow) and (TQtMainWindow(Self).IsMdiChild) then
|
||||
begin
|
||||
if not TCustomForm(LCLObject).Active then
|
||||
begin
|
||||
SlotActivateWindow(True);
|
||||
Result := True;
|
||||
QEvent_ignore(Event);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
QEventWindowStateChange:
|
||||
begin
|
||||
if IsMainForm then
|
||||
|
Loading…
Reference in New Issue
Block a user