-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#279
- Loading branch information
1 parent
4d3f24d
commit e25e766
Showing
3 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/plugins/platform/treeland/dtreelandwindowmanagerhelper.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
#include "dtreelandwindowmanagerhelper.h" | ||
#include "personalizationwaylandclientextension.h" | ||
|
||
DGUI_BEGIN_NAMESPACE | ||
|
||
TreelandWindowManagerHelper::TreelandWindowManagerHelper(QObject *parent) | ||
: DWindowManagerHelper(parent) | ||
{ | ||
connect(PersonalizationManager::instance(), &PersonalizationManager::activeChanged, this, [this](){ | ||
Q_EMIT hasBlurWindowChanged(); | ||
Q_EMIT hasNoTitlebarChanged(); | ||
}); | ||
} | ||
|
||
bool TreelandWindowManagerHelper::hasBlurWindow() const | ||
{ | ||
return PersonalizationManager::instance()->isSupported(); | ||
} | ||
|
||
bool TreelandWindowManagerHelper::hasComposite() const | ||
{ | ||
return true; | ||
} | ||
|
||
bool TreelandWindowManagerHelper::hasNoTitlebar() const | ||
{ | ||
return PersonalizationManager::instance()->isSupported(); | ||
} | ||
|
||
DGUI_END_NAMESPACE |
25 changes: 25 additions & 0 deletions
25
src/plugins/platform/treeland/dtreelandwindowmanagerhelper.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
|
||
#ifndef DTREELANDWINDOWMANAGERHELPER_H | ||
#define DTREELANDWINDOWMANAGERHELPER_H | ||
|
||
#include "dtkgui_global.h" | ||
#include "dwindowmanagerhelper.h" | ||
#include <QObject> | ||
|
||
DGUI_BEGIN_NAMESPACE | ||
|
||
class TreelandWindowManagerHelper : public DWindowManagerHelper | ||
{ | ||
public: | ||
explicit TreelandWindowManagerHelper(QObject *parent = 0); | ||
bool hasBlurWindow() const; | ||
bool hasComposite() const; | ||
bool hasNoTitlebar() const; | ||
}; | ||
|
||
DGUI_END_NAMESPACE | ||
|
||
#endif // DTREELANDWINDOWMANAGERHELPER_H |