Renamed signal to windowActiveAboutToChange()
Added the 'aboutTo', as the event hasn't been caught by the top-level window yet
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
- Wayland support
|
||||
- Added Flag_KeepAboveIfNotUtilityWindow, so you can have keep above even if
|
||||
floating window is shown in the task-bar.
|
||||
- Added DockWidget::windowActiveChanged() signal
|
||||
- Added DockWidget::windowActiveAboutToChange() signal
|
||||
|
||||
* v1.1.0 (26 October 2020)
|
||||
- New drop indicator style type: Segmented Indicators
|
||||
|
||||
@@ -602,7 +602,7 @@ bool DockWidgetBase::eventFilter(QObject *watched, QEvent *event)
|
||||
const bool isWindowActivate = event->type() == QEvent::WindowActivate;
|
||||
const bool isWindowDeactivate = event->type() == QEvent::WindowDeactivate;
|
||||
if (isWindowActivate || isWindowDeactivate)
|
||||
Q_EMIT windowActiveChanged(isWindowActivate);
|
||||
Q_EMIT windowActiveAboutToChange(isWindowActivate);
|
||||
|
||||
return QWidgetAdapter::eventFilter(watched, event);
|
||||
}
|
||||
|
||||
@@ -410,7 +410,10 @@ Q_SIGNALS:
|
||||
///@brief Emitted when the top-level window this dock widget is in is activated or deactivated
|
||||
///This is convenience to replace tracking dockWidget->window(), since the window changes when
|
||||
///docking and undocking
|
||||
void windowActiveChanged(bool activated);
|
||||
///
|
||||
/// It's called 'aboutTo' because it's done in an event filter and the target window doesn't
|
||||
/// have it's 'activeWindow' property updated yet at this point.
|
||||
void windowActiveAboutToChange(bool activated);
|
||||
|
||||
protected:
|
||||
void onParentChanged();
|
||||
|
||||
Reference in New Issue
Block a user