Qt: moved TQtMainWindow specific events to TQtMainWindow.EventFilter(), fixed MDI windows activation order.

git-svn-id: trunk@23541 -
This commit is contained in:
zeljko 2010-01-23 17:21:48 +00:00
parent 1bc6b10b9e
commit 0a03e94890

View File

@ -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