-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
此修改为配合窗管一起修改,解决wayland下多实例接收数据导致的问题。已将wayland下剪切板给UI提供数据和管理数据实例合并,去掉插件。 Log: 修复浏览器中选中文本后长按Ctrl+C出现桌面崩溃的问题。 Bug: https://pms.uniontech.com/bug-view-151723.html Influence: 剪切板全量功能。
- Loading branch information
1 parent
f5ac129
commit d54b654
Showing
20 changed files
with
116 additions
and
1,084 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
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,31 @@ | ||
// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#include "clipboarddaemon.h" | ||
#include "clipboardloader.h" | ||
|
||
#include <QDBusError> | ||
#include <QDBusConnection> | ||
|
||
ClipboardDaemon::ClipboardDaemon(QObject *parent) | ||
: QObject(parent) | ||
{ | ||
QDBusConnection connection = QDBusConnection::sessionBus(); | ||
if (!connection.registerService("com.deepin.dde.ClipboardLoader")) { | ||
qInfo() << "error:" << connection.lastError().message(); | ||
} | ||
|
||
ClipboardLoader *clipboardLoader = new ClipboardLoader(this); | ||
connection.registerObject("/com/deepin/dde/ClipboardLoader", clipboardLoader, | ||
QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals); | ||
|
||
// 剪切板管理和提供UI数据的功能合并,WaylandCopyClient只实例化一次 | ||
#if 0 | ||
// 实例化wayland 剪切板管理器 | ||
if (qEnvironmentVariable("XDG_SESSION_TYPE").contains("wayland")) { | ||
WaylandCopyClient *waylandClipboardManager = new WaylandCopyClient(this); | ||
waylandClipboardManager->init(true); | ||
} | ||
#endif | ||
} |
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,17 @@ | ||
// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#ifndef CLIPBOARD_DAEMON_H | ||
#define CLIPBOARD_DAEMON_H | ||
|
||
#include <QObject> | ||
|
||
class ClipboardDaemon : public QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit ClipboardDaemon(QObject *parent = nullptr); | ||
}; | ||
|
||
#endif //CLIPBOARD_DAEMON_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
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
File renamed without changes.
Oops, something went wrong.