mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Set attribute Qt::WA_X11NetWmWindowTypeDock permanently for floating widgets
This commit is contained in:
parent
3332f6050e
commit
5978aaaedc
@ -232,7 +232,7 @@ void MainWindowPrivate::createContent()
|
||||
// Test creation of floating dock widgets
|
||||
DockWidget = createFileSystemTreeDockWidget(ViewMenu);
|
||||
auto FloatingWidget = DockManager->addDockWidgetFloating(DockWidget);
|
||||
FloatingWidget->move(QPoint(0, 0));
|
||||
FloatingWidget->move(QPoint(20, 20));
|
||||
FloatingWidget = DockManager->addDockWidgetFloating(createLongTextLabelDockWidget(ViewMenu));
|
||||
FloatingWidget->move(QPoint(100, 100));
|
||||
|
||||
|
@ -249,6 +249,7 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) :
|
||||
QDockWidget::setFeatures(QDockWidget::AllDockWidgetFeatures);
|
||||
setTitleBarWidget(d->TitleBar);
|
||||
connect(d->TitleBar, SIGNAL(closeRequested()), SLOT(close()));
|
||||
setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
|
||||
#else
|
||||
setWindowFlags(
|
||||
Qt::Window | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
|
||||
@ -509,7 +510,7 @@ void CFloatingDockContainer::startFloating(const QPoint &DragStartMousePos,
|
||||
#ifdef Q_OS_LINUX
|
||||
if (DraggingFloatingWidget == DragState)
|
||||
{
|
||||
setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
|
||||
//setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
|
||||
d->MouseEventHandler = MouseEventHandler;
|
||||
if (d->MouseEventHandler)
|
||||
{
|
||||
@ -619,7 +620,7 @@ void CFloatingDockContainer::finishDragging()
|
||||
{
|
||||
ADS_PRINT("CFloatingDockContainer::finishDragging");
|
||||
#ifdef Q_OS_LINUX
|
||||
setAttribute(Qt::WA_X11NetWmWindowTypeDock, false);
|
||||
//setAttribute(Qt::WA_X11NetWmWindowTypeDock, false);
|
||||
setWindowOpacity(1);
|
||||
activateWindow();
|
||||
if (d->MouseEventHandler)
|
||||
|
Loading…
Reference in New Issue
Block a user