mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 21:25:44 +08:00
Fixed handling on spontaneous hide events in CFloatingDockContainer for Linux
This commit is contained in:
parent
2e88d8651e
commit
2ee7deb6d5
@ -249,7 +249,6 @@ 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);
|
||||
@ -384,6 +383,11 @@ void CFloatingDockContainer::closeEvent(QCloseEvent *event)
|
||||
void CFloatingDockContainer::hideEvent(QHideEvent *event)
|
||||
{
|
||||
Super::hideEvent(event);
|
||||
if (event->spontaneous())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent toogleView() events during restore state
|
||||
if (d->DockManager->isRestoringState())
|
||||
{
|
||||
@ -510,7 +514,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)
|
||||
{
|
||||
@ -620,7 +624,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