Skip to content

Commit

Permalink
fix: the shortcut panel shadow
Browse files Browse the repository at this point in the history
fix the shortcut panel after click the screenshot,
the screenshot has the shadow of the shortcut panel

Log: fix the shortcut panel shadow
Bug: https://pms.uniontech.com/bug-view-280671.html
  • Loading branch information
add-uos committed Oct 26, 2024
1 parent 2807f3e commit 5825278
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
14 changes: 9 additions & 5 deletions src/dde-dock-plugins/shotstart/shotstartplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <DApplication>
#include <QDesktopWidget>
#include <QDBusInterface>

#include <QtConcurrent>
#define ShotShartPlugin "shot-start-plugin"
#define ShotShartApp "deepin-screen-recorder" // 使用截图录屏的翻译

Expand Down Expand Up @@ -234,10 +234,14 @@ void ShotStartPlugin::onClickQuickPanel()
if (!m_isRecording) {
qCDebug(SHOT_LOG) << "Get Shot DBus Interface";
m_proxyInter->requestSetAppletVisible(this, pluginName(), false);
QDBusInterface shotDBusInterface(
"com.deepin.Screenshot", "/com/deepin/Screenshot", "com.deepin.Screenshot", QDBusConnection::sessionBus());
shotDBusInterface.asyncCall("StartScreenshot");
qCDebug(SHOT_LOG) << "Shot and Recorder plugin start run!";
QtConcurrent::run([=]() {
QThread::msleep(500);
qDebug(SHOT_LOG) << "shot-panel has hiden, will call screen-shot service";
QDBusInterface shotDBusInterface(
"com.deepin.Screenshot", "/com/deepin/Screenshot", "com.deepin.Screenshot", QDBusConnection::sessionBus());
shotDBusInterface.asyncCall("StartScreenshot");
qCDebug(SHOT_LOG) << "Shot and Recorder plugin start run!";
});
}
}

Expand Down
15 changes: 10 additions & 5 deletions src/dde-dock-plugins/shotstartrecord/shotstartrecordplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <DApplication>
#include <QDesktopWidget>
#include <QDBusInterface>

#include <QtConcurrent>
#define RecordShartPlugin "shot-start-record-plugin"
#define RecordShartApp "deepin-screen-recorder" // 使用截图录屏的翻译

Expand Down Expand Up @@ -292,10 +292,15 @@ void ShotStartRecordPlugin::onClickQuickPanel()
qCDebug(RECORD_LOG) << "(onClickQuickPanel) 点击快捷面板";
m_proxyInter->requestSetAppletVisible(this, pluginName(), false);
qCDebug(RECORD_LOG) << "Get Record DBus Interface";
QDBusInterface recordDBusInterface(
"com.deepin.ScreenRecorder", "/com/deepin/ScreenRecorder", "com.deepin.ScreenRecorder", QDBusConnection::sessionBus());
recordDBusInterface.asyncCall("stopRecord");
qCDebug(RECORD_LOG) << "Recorder plugin stop run!";
QtConcurrent::run([=]() {
QThread::msleep(500);
qDebug(RECORD_LOG) << "record-panel has hiden, will call screen-recorde service";
QDBusInterface recordDBusInterface(
"com.deepin.ScreenRecorder", "/com/deepin/ScreenRecorder", "com.deepin.ScreenRecorder", QDBusConnection::sessionBus());
recordDBusInterface.asyncCall("stopRecord");
qCDebug(RECORD_LOG) << "Recorder plugin stop run!";
});

}

/**
Expand Down

0 comments on commit 5825278

Please sign in to comment.