Skip to content

Commit

Permalink
fix: exit animation of the application disappeared in treeland
Browse files Browse the repository at this point in the history
When clicking the close button, call the widget::close.
Modify that calling dapplication::quit is the same as clicking the option to exit

Log:
  • Loading branch information
FeiWang1119 committed Nov 23, 2024
1 parent 3fb2ebd commit fb82576
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/widgets/dtitlebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <QScreen>
#include <QWindow>
#include <QActionGroup>
#include <qnamespace.h>
#include <qpa/qplatformwindow.h>

#include "dpalettehelper.h"
Expand Down Expand Up @@ -1533,7 +1534,7 @@ void DTitlebar::setVisible(bool visible)
connect(d->maxButton, SIGNAL(clicked()), this, SLOT(_q_toggleWindowState()), Qt::UniqueConnection);
connect(this, SIGNAL(doubleClicked()), this, SLOT(_q_toggleWindowState()), Qt::UniqueConnection);
connect(d->minButton, SIGNAL(clicked()), this, SLOT(_q_showMinimized()), Qt::UniqueConnection);
connect(d->closeButton, &DWindowCloseButton::clicked, d->targetWindow(), &QWidget::close, Qt::UniqueConnection);
connect(d->closeButton, SIGNAL(clicked(bool)), this, SLOT(_q_quitActionTriggered()), Qt::UniqueConnection);

d->updateButtonsState(d->targetWindow()->windowFlags());
} else {
Expand Down

0 comments on commit fb82576

Please sign in to comment.