Add Frame::requestedFloatingWindowFlags()
Just so we can share this bit of code without duplicating it
This commit is contained in:
@@ -197,11 +197,7 @@ static FloatingWindowFlags floatingWindowFlagsForFrame(Frame *frame)
|
||||
if (!frame)
|
||||
return FloatingWindowFlag::FromGlobalConfig;
|
||||
|
||||
const auto dockwidgets = frame->dockWidgets();
|
||||
if (!dockwidgets.isEmpty())
|
||||
return dockwidgets.first()->floatingWindowFlags();
|
||||
|
||||
return FloatingWindowFlag::FromGlobalConfig;
|
||||
return frame->requestedFloatingWindowFlags();
|
||||
}
|
||||
|
||||
FloatingWindow::FloatingWindow(Frame *frame, QRect suggestedGeometry, MainWindowBase *parent)
|
||||
|
||||
@@ -918,3 +918,12 @@ WidgetResizeHandler *Frame::resizeHandler() const
|
||||
{
|
||||
return m_resizeHandler;
|
||||
}
|
||||
|
||||
FloatingWindowFlags Frame::requestedFloatingWindowFlags() const
|
||||
{
|
||||
const auto dockwidgets = this->dockWidgets();
|
||||
if (!dockwidgets.isEmpty())
|
||||
return dockwidgets.first()->floatingWindowFlags();
|
||||
|
||||
return FloatingWindowFlag::FromGlobalConfig;
|
||||
}
|
||||
|
||||
@@ -312,6 +312,9 @@ public:
|
||||
/// @brief Returns the resize handler. Used mostly in MDI mode.
|
||||
WidgetResizeHandler *resizeHandler() const;
|
||||
|
||||
/// @brief User requested floating window flags for when this group floats
|
||||
FloatingWindowFlags requestedFloatingWindowFlags() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void currentDockWidgetChanged(KDDockWidgets::DockWidgetBase *);
|
||||
void numDockWidgetsChanged();
|
||||
|
||||
Reference in New Issue
Block a user