Minor code move, so next diff is short
This commit is contained in:
@@ -73,6 +73,17 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
static Qt::WindowFlags windowFlagsToUse()
|
||||
{
|
||||
if (KDDockWidgets::usesNativeDraggingAndResizing())
|
||||
return Qt::Window;
|
||||
|
||||
if (Config::self().flags() & Config::Flag_DontUseUtilityWindowsForFloating)
|
||||
return Qt::Window;
|
||||
|
||||
return Qt::Tool;
|
||||
}
|
||||
|
||||
static MainWindowBase* hackFindParentHarder(Frame *frame, MainWindowBase *candidateParent)
|
||||
{
|
||||
// TODO: Using a parent helps the floating windows stay in front of the main window always.
|
||||
@@ -103,17 +114,6 @@ static MainWindowBase* hackFindParentHarder(Frame *frame, MainWindowBase *candid
|
||||
}
|
||||
}
|
||||
|
||||
static Qt::WindowFlags windowFlagsToUse()
|
||||
{
|
||||
if (KDDockWidgets::usesNativeDraggingAndResizing())
|
||||
return Qt::Window;
|
||||
|
||||
if (Config::self().flags() & Config::Flag_DontUseUtilityWindowsForFloating)
|
||||
return Qt::Window;
|
||||
|
||||
return Qt::Tool;
|
||||
}
|
||||
|
||||
FloatingWindow::FloatingWindow(MainWindowBase *parent)
|
||||
: QWidgetAdapter(parent, windowFlagsToUse())
|
||||
, Draggable(this, KDDockWidgets::usesNativeDraggingAndResizing()) // FloatingWindow is only draggable when using a native title bar. Otherwise the KDDockWidgets::TitleBar is the draggable
|
||||
|
||||
Reference in New Issue
Block a user