mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-13 16:42:06 +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
|
// Test creation of floating dock widgets
|
||||||
DockWidget = createFileSystemTreeDockWidget(ViewMenu);
|
DockWidget = createFileSystemTreeDockWidget(ViewMenu);
|
||||||
auto FloatingWidget = DockManager->addDockWidgetFloating(DockWidget);
|
auto FloatingWidget = DockManager->addDockWidgetFloating(DockWidget);
|
||||||
FloatingWidget->move(QPoint(0, 0));
|
FloatingWidget->move(QPoint(20, 20));
|
||||||
FloatingWidget = DockManager->addDockWidgetFloating(createLongTextLabelDockWidget(ViewMenu));
|
FloatingWidget = DockManager->addDockWidgetFloating(createLongTextLabelDockWidget(ViewMenu));
|
||||||
FloatingWidget->move(QPoint(100, 100));
|
FloatingWidget->move(QPoint(100, 100));
|
||||||
|
|
||||||
|
@ -249,6 +249,7 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) :
|
|||||||
QDockWidget::setFeatures(QDockWidget::AllDockWidgetFeatures);
|
QDockWidget::setFeatures(QDockWidget::AllDockWidgetFeatures);
|
||||||
setTitleBarWidget(d->TitleBar);
|
setTitleBarWidget(d->TitleBar);
|
||||||
connect(d->TitleBar, SIGNAL(closeRequested()), SLOT(close()));
|
connect(d->TitleBar, SIGNAL(closeRequested()), SLOT(close()));
|
||||||
|
setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
|
||||||
#else
|
#else
|
||||||
setWindowFlags(
|
setWindowFlags(
|
||||||
Qt::Window | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
|
Qt::Window | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
|
||||||
@ -509,7 +510,7 @@ void CFloatingDockContainer::startFloating(const QPoint &DragStartMousePos,
|
|||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
if (DraggingFloatingWidget == DragState)
|
if (DraggingFloatingWidget == DragState)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
|
//setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
|
||||||
d->MouseEventHandler = MouseEventHandler;
|
d->MouseEventHandler = MouseEventHandler;
|
||||||
if (d->MouseEventHandler)
|
if (d->MouseEventHandler)
|
||||||
{
|
{
|
||||||
@ -619,7 +620,7 @@ void CFloatingDockContainer::finishDragging()
|
|||||||
{
|
{
|
||||||
ADS_PRINT("CFloatingDockContainer::finishDragging");
|
ADS_PRINT("CFloatingDockContainer::finishDragging");
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
setAttribute(Qt::WA_X11NetWmWindowTypeDock, false);
|
//setAttribute(Qt::WA_X11NetWmWindowTypeDock, false);
|
||||||
setWindowOpacity(1);
|
setWindowOpacity(1);
|
||||||
activateWindow();
|
activateWindow();
|
||||||
if (d->MouseEventHandler)
|
if (d->MouseEventHandler)
|
||||||
|
Loading…
Reference in New Issue
Block a user