linuxdeepin / developer-center

Deepin developer center, provide developer wiki and community forum.
452 stars 73 forks source link

"Save to clipboard" is not working #5921

Open seekstar opened 1 year ago

seekstar commented 1 year ago

SUMMARY | 问题概要

I have chosen the target to be the clipboard. However, after the screenshot is taken, the screenshot is not in the clipboard.

SOFTWARE/OS VERSIONS | 软件/系统版本信息

Distribution: Arch Linux
Desktop environment: KDE Plasma, X11
Package: extra/deepin-screen-recorder 5.12.8-1 (deepin-extra)

PRE-REQUIREMENT | 预置条件

No response

STEPS TO REPRODUCE | 复现步骤

  1. Open a terminal, e.g., konsole
  2. Execute deepin-screen-recorder
  3. Double tap to take screenshot (the target has been set to clipboard)
  4. ctrl+v in LibreOffice writer or anywhere else that recognizes a picture

OBSERVED RESULT | 观察到的结果

The pasted content is the original content instead of the screenshot taken

EXPECTED RESULT | 期望的结果

No response

ADDITIONAL INFORMATION | 额外补充

Note that if the target is set to desktop, then the screenshot is stored there successfully.

Here is the log:

QLibraryInfo::LibrariesPath:  "/usr/lib"
("libavcodec.so", "libavcodec.so.58", "libavcodec.so.58.134.100", "libavcodec.so.60", "libavcodec.so.60.3.100")  exists in the  "/usr/lib"
目录( "/usr/lib" )中存在编码库( "libavcodec.so" )
编码库加载成功!编码器存在 AVCodecID: 27
Is exists ffmpeg in path(/usr/bin/):  true
2023-10-18, 21:05:53.825 [Debug] [dguiapplicationhelper.cpp Dtk::Gui::DGuiApplicationHelper::loadTranslator 1597] load translate "/usr/share/dtk5/DWidget/translations/dtkwidget_zh_CN"
2023-10-18, 21:05:53.825 [Debug] [dguiapplicationhelper.cpp Dtk::Gui::DGuiApplicationHelper::loadTranslator 1597] load translate "/usr/share/qt/translations/qt_zh_CN"
2023-10-18, 21:05:53.825 [Debug] [dguiapplicationhelper.cpp Dtk::Gui::DGuiApplicationHelper::loadTranslator 1597] load translate "/usr/share/qt/translations/qtbase_zh_CN"
2023-10-18, 21:05:53.825 [Debug] [dguiapplicationhelper.cpp Dtk::Gui::DGuiApplicationHelper::loadTranslator 1597] load translate "/usr/share/deepin-screen-recorder/translations/deepin-screen-recorder_zh_CN"
2023-10-18, 21:05:53.826 [Info] [utils.cpp            Utils::showCurrentSys               230] isDeepin:  false
2023-10-18, 21:05:53.826 [Info] [utils.cpp            Utils::showCurrentSys               231] isDDE:  false
2023-10-18, 21:05:53.827 [Info] [utils.cpp            Utils::showCurrentSys               232] SystemName:  "深度操作系统"
2023-10-18, 21:05:53.827 [Info] [utils.cpp            Utils::showCurrentSys               233] EditionName:  "社区版(Beta2)"
2023-10-18, 21:05:53.827 [Info] [utils.cpp            Utils::showCurrentSys               234] ProductTypeName:  "桌面"
2023-10-18, 21:05:53.827 [Info] [utils.cpp            Utils::showCurrentSys               235] SystemVersion:  "23"
2023-10-18, 21:05:53.827 [Info] [utils.cpp            Utils::showCurrentSys               236] uosEditionType:  3
2023-10-18, 21:05:53.827 [Info] [main.cpp             main                                210] 截图录屏版本:  ""
2023-10-18, 21:05:53.827 [Info] [main.cpp             main                                214] KF5_WAYLAND_FLAGE_ON is close!!
2023-10-18, 21:05:53.827 [Info] [main.cpp             main                                216] Is Table: false
2023-10-18, 21:05:53.827 [Info] [main.cpp             main                                217] Is Wayland: false
2023-10-18, 21:05:53.827 [Info] [main.cpp             main                                218] Is Root User: false
2023-10-18, 21:05:53.827 [Info] [main.cpp             main                                219] Is Exists FFmpeg Lib: true
2023-10-18, 21:05:53.827 [Debug] [record_process.cpp   RecordProcess::RecordProcess        46] 录屏控制类初始化!2023-10-18, 21:05:53.839 [Debug] [  ] createPlatformWindow QWindow(0x7fff9ca411b0) Qt::Window QWindow(0x0)
2023-10-18, 21:05:53.840 [Info] [main_window.cpp      MainWindow::initMainWindow          111] 111 initMainWindow 正在初始化截图录屏主窗口...
2023-10-18, 21:05:53.840 [Debug] [main_window.cpp      MainWindow::initMainWindow          147] "DP-1" QRect(0,0 1920x1080)
2023-10-18, 21:05:53.840 [Debug] [main_window.cpp      MainWindow::initMainWindow          186] QSize(3840, 2160) false 2160
2023-10-18, 21:05:53.840 [Info] [main_window.cpp      MainWindow::initMainWindow          192] 192 initMainWindow 截图录屏主窗口已初始化2023-10-18, 21:05:53.841 [Info] [main_window.cpp      MainWindow::initAttributes          197] 197 initAttributes 正在初始化一些属性...
2023-10-18, 21:05:53.841 [Info] [main_window.cpp      MainWindow::initAttributes          198] m_functionType:  0
2023-10-18, 21:05:53.848 [Debug] [main_window.cpp      MainWindow::initAttributes          206] screen size QRect(0,0 1920x1080)
2023-10-18, 21:05:53.849 [Debug] [  ] createPlatformWindow QWidgetWindow(0x55a14c4595f0, name="MainWindowClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:05:53.886 [Debug] [  ] createPlatformBackingStore QWidgetWindow(0x55a14c4595f0, name="MainWindowClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:05:53.886 [Debug] [main_window.cpp      MainWindow::initAttributes          251] 获取自动识别的窗口...
2023-10-18, 21:05:53.886 [Debug] [  ] createPlatformWindow Dtk::Gui::DForeignWindow(0x55a14c533f50) Qt::ForeignWindow QWindow(0x0)
2023-10-18, 21:05:53.887 [Debug] [utils.cpp            Utils::getAllWindowInfo             300] 
窗口名称: >>>>  "plasmashell" 
x:  0 
y:  0 
width:  1920 
height:  1080
2023-10-18, 21:05:53.887 [Debug] [  ] createPlatformWindow Dtk::Gui::DForeignWindow(0x7f3270004f30) Qt::ForeignWindow QWindow(0x0)
2023-10-18, 21:05:53.888 [Debug] [utils.cpp            Utils::getAllWindowInfo             300] 
窗口名称: >>>>  "Navigator" 
x:  0 
y:  0 
width:  1920 
height:  1033
2023-10-18, 21:05:53.888 [Debug] [  ] createPlatformWindow Dtk::Gui::DForeignWindow(0x7f32700051a0) Qt::ForeignWindow QWindow(0x0)
2023-10-18, 21:05:53.889 [Debug] [utils.cpp            Utils::getAllWindowInfo             300] 
窗口名称: >>>>  "konsole" 
x:  480 
y:  270 
width:  960 
height:  493
2023-10-18, 21:05:53.889 [Debug] [  ] createPlatformWindow Dtk::Gui::DForeignWindow(0x7f32700052f0) Qt::ForeignWindow QWindow(0x0)
2023-10-18, 21:05:53.890 [Debug] [utils.cpp            Utils::getAllWindowInfo             300] 
窗口名称: >>>>  "plasmashell" 
x:  0 
y:  1033 
width:  1920 
height:  47
2023-10-18, 21:05:53.890 [Debug] [main_window.cpp      MainWindow::initAttributes          278] 获取自动识别窗口已完成2023-10-18, 21:05:53.891 [Warning] [zoomIndicator.cpp    ZoomIndicator::ZoomIndicator        33] 无法获取多任务视图dbus接口!2023-10-18, 21:05:53.891 [Info] [zoomIndicator.cpp    ZoomIndicator::ZoomIndicator        44] 多任务视图是否打开:  否2023-10-18, 21:05:53.891 [Debug] [  ] createPlatformWindow QWidgetWindow(0x55a14c456b10, name="desktopWindow") Qt::Desktop QWindow(0x0)
2023-10-18, 21:05:53.941 [Debug] [main_window.cpp      MainWindow::initBackground          1733] screen rect: QRect(0,0 3840x2160)
2023-10-18, 21:05:53.945 [Debug] [main_window.cpp      MainWindow::initAttributes          348] 发送鼠标事件!
2023-10-18, 21:05:53.947 [Info] [main_window.cpp      MainWindow::initAttributes          354] 354 initAttributes 属性初始化已完成2023-10-18, 21:05:53.951 [Debug] [  ] createPlatformWindow QWidgetWindow(0x55a14c484180, name="ButtonFeedbackClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:05:53.953 [Debug] [  ] createPlatformBackingStore QWidgetWindow(0x55a14c484180, name="ButtonFeedbackClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.420 [Debug] [subtoolwidget.cpp    SubToolWidget::initRecordLabel      466] t_saveIndex:  QVariant(QString, "6")
2023-10-18, 21:06:03.421 [Debug] [subtoolwidget.cpp    SubToolWidget::initRecordLabel      468] t_saveIndex:  6
2023-10-18, 21:06:03.442 [Debug] [subtoolwidget.cpp    SubToolWidget::initShotLabel        686] Utils::themeType:  1
2023-10-18, 21:06:03.446 [Info] [subtoolwidget.cpp    SubToolWidget::initShotLabel        716] initShotLabel 716 OCR_SCROLL_FLAGE_ON is open!!
2023-10-18, 21:06:03.454 [Debug] [subtoolwidget.cpp    SubToolWidget::initShotLabel        868] 不存在指定路径2023-10-18, 21:06:03.510 [Info] [main_window.cpp      MainWindow::updateToolBarPos        2059] 正在初始化v4l2core...
V4L2_CORE: Device Node Path: /dev/video0
V4L2_CORE: Device Node Path: /dev/video1
V4L2_CORE: V4L2_CAP_VIDEO_CAPTURE error: 成功V4L2_CORE: ignore the device(/dev/video1) for not have the ability to capture video.
2023-10-18, 21:06:03.512 [Info] [main_window.cpp      MainWindow::updateToolBarPos        2061] 初始化v4l2core已完成2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x55a14c720ac0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x55a14c720ac0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x55a14c720ac0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x55a14c720ac0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x7f3278017510, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x7f3278017510, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x7f3278017510, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x7f3278017510, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x55a14ca29e60, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x55a14ca29e60, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x55a14ca29e60, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x55a14ca29e60, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x55a14c7f81f0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x55a14c7f81f0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x55a14c7f81f0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x55a14c7f81f0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x55a14c7156d0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x55a14c7156d0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] setEnableNoTitlebar true QWidgetWindow(0x55a14c7156d0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.513 [Debug] [  ] enableDxcb QWidgetWindow(0x55a14c7156d0, name="QMenuClassWindow") Qt::Window QWindow(0x0)
2023-10-18, 21:06:03.550 [Debug] [main_window.cpp      MainWindow::eventFilter             3840] 双击鼠标按钮!进行截图保存!2023-10-18, 21:06:03.550 [Info] [main_window.cpp      MainWindow::saveScreenShot          2806] saveScreenShot 2806 正在执行截图保存流程...
2023-10-18, 21:06:03.550 [Info] [main_window.cpp      MainWindow::saveScreenShot          2831] 隐藏所有widget!
2023-10-18, 21:06:03.551 [Debug] [main_window.cpp      MainWindow::saveScreenShot          2876] 普通截图模式下保存图片2023-10-18, 21:06:03.551 [Info] [main_window.cpp      MainWindow::shotCurrentImg          5215] shotCurrentImg 5215 正在截取当前图片...
2023-10-18, 21:06:03.552 [Info] [main_window.cpp      MainWindow::addCursorToImage        5285] addCursorToImage 5285 正在往图片中添加光标...
2023-10-18, 21:06:03.552 [Info] [main_window.cpp      MainWindow::shotCurrentImg          5262] shotCurrentImg 5262 已截取当前图片!2023-10-18, 21:06:03.553 [Info] [main_window.cpp      MainWindow::saveAction              2985] saveAction 2985 正在执行保存动作...
2023-10-18, 21:06:03.553 [Info] [main_window.cpp      MainWindow::saveAction              3158] saveAction 3158 保存到剪切板!2023-10-18, 21:06:03.553 [Debug] [main_window.cpp      MainWindow::saveAction              3159] 4 SaveToClipboard
2023-10-18, 21:06:03.553 [Debug] [main_window.cpp      MainWindow::saveAction              3328] m_saveFileName:  ""
2023-10-18, 21:06:03.553 [Info] [main_window.cpp      MainWindow::save2Clipboard          1781] save2Clipboard 1781 正在执行保存到剪贴板...
2023-10-18, 21:06:03.553 [Info] [main_window.cpp      MainWindow::save2Clipboard          1827] save2Clipboard 1827 将数据传递到剪贴板!2023-10-18, 21:06:03.553 [Info] [main_window.cpp      MainWindow::save2Clipboard          1831] save2Clipboard 1831 已保存到剪贴板!2023-10-18, 21:06:03.554 [Info] [main_window.cpp      MainWindow::sendNotify              2894] sendNotify 2894 正在发送通知消息...
2023-10-18, 21:06:03.555 [Debug] [main_window.cpp      MainWindow::sendNotify              2959] saveFilePath: "剪贴板"
2023-10-18, 21:06:03.561 [Info] [main_window.cpp      MainWindow::sendNotify              2973] sendNotify 2973 通知消息已发送!2023-10-18, 21:06:03.561 [Info] [main_window.cpp      MainWindow::saveScreenShot          2888] saveScreenShot 2888 截图保存流程已完成!2023-10-18, 21:06:03.572 [Info] [main_window.cpp      MainWindow::exitApp                 5750] exitApp 5750 退出截图录屏!2023-10-18, 21:06:03.574 [Info] [main_window.h        MainWindow::~MainWindow             133] ~MainWindow 133 正在释放截图录屏相关资源...
2023-10-18, 21:06:03.574 [Info] [main_window.h        MainWindow::~MainWindow             234] ~MainWindow 234 正在退出截图录屏全局事件监听线程...
2023-10-18, 21:06:03.574 [Info] [main_window.h        MainWindow::~MainWindow             237] ~MainWindow 237 启动3s超时监听2023-10-18, 21:06:03.574 [Info] [main_window.h        MainWindow::~MainWindow             239] ~MainWindow 239 正在释放截图录屏全局事件X11相关资源...
2023-10-18, 21:06:03.575 [Debug] [delaytime.cpp        DelayTime::run                      41] run 41 延时开始...
2023-10-18, 21:06:03.575 [Info] [event_monitor.cpp    EventMonitor::releaseRes            31] releaseRes 31 执行 XRecordDisableContext ...
2023-10-18, 21:06:03.575 [Info] [event_monitor.cpp    EventMonitor::releaseRes            33] releaseRes 33 执行 XRecordFreeContext ...
2023-10-18, 21:06:03.575 [Info] [event_monitor.cpp    EventMonitor::releaseRes            35] releaseRes 35 执行 XSync ...
2023-10-18, 21:06:03.575 [Info] [event_monitor.cpp    EventMonitor::releaseRes            38] releaseRes 38 执行 XCloseDisplay m_display_datalink...
2023-10-18, 21:06:03.575 [Info] [event_monitor.cpp    EventMonitor::releaseRes            40] releaseRes 40 执行 XCloseDisplay m_display...
2023-10-18, 21:06:03.575 [Info] [main_window.h        MainWindow::~MainWindow             242] ~MainWindow 242 全局事件监听线程正在等待释放x11相关资源...
2023-10-18, 21:06:03.575 [Info] [main_window.h        MainWindow::~MainWindow             244] ~MainWindow 244 已释放X11相关资源2023-10-18, 21:06:03.575 [Info] [main_window.h        MainWindow::~MainWindow             247] ~MainWindow 247 截图录屏全局事件监听线程已退出!2023-10-18, 21:06:03.576 [Debug] [delaytime.cpp        DelayTime::stop                     25] stop 25 停止延时2023-10-18, 21:06:04.076 [Info] [main_window.h        MainWindow::~MainWindow             257] ~MainWindow 257 截图录屏相关资源已释放No appenders registered with dlogger
[Warning] <> QObject::startTimer: Timers can only be used with threads started with QThread
[Warning] <> QObject::startTimer: Timers can only be used with threads started with QThread
BLumia commented 1 year ago

Hi, are you using x11 or wayland?

seekstar commented 1 year ago

I'm using X11

BLumia commented 1 year ago

Does the KDE's built-in screenshot tool work fine? If it doesn't then you are probably missing a clipboard management tool.

Probably related: https://github.com/linuxdeepin/developer-center/issues/1091#issuecomment-535765751

seekstar commented 1 year ago

Do you mean spectacle? It works fine. By the way, flameshot and shutter also work fine.

I also tried to install gnome-settings-daemon as https://github.com/linuxdeepin/developer-center/issues/1091#issuecomment-535765751 suggested, but it still fails to save to the clipboard.

seekstar commented 1 year ago

Hello, have you reproduced this issue? I love deepin-screenshot (which seems not available in Arch Linux anymore) and its successor deepin-screen-recorder, but this issue keeps me from using it.

BLumia commented 1 year ago

Hello, have you reproduced this issue?

Sorry I haven't try to reproduce this issue yet since currently DDE and KDE cannot co-exist on Arch Linux at this moment due to some issues of dde-session (i.e. When DDE and KDE are both installed, if any DDE services are started while starting a KDE session then the session will be stopped), and I don't have a clean installation with KDE but without DDE yet.