hluk/CopyQ

CopyQ Freezes When Accessing Own Clipboard Data in Wayland

开放

#3,125 创建于 2025年8月13日

 (5 条评论) (1 个反应) (0 位负责人)C++ (584 个派生)batch import
Waylandbughelp wanted

仓库指标

星标
 (12,155 个星标)
PR 合并指标
 (平均合并 17小时 35分钟) (30 天内合并 13 个 PR)

描述

Describe the bug

When using CopyQ in Wayland (without XWayland), the application freezes for about 1 second when attempting to paste an item immediately after selecting it in the CopyQ interface. This issue appears to be related to two recent commits related to accessing the clipboard in Wayland: c55fcb2c (Wayland: Fix accessing own clipboard) and bfe76c16 (Wayland: Fix crash when getting own clipboard data).

To Reproduce

  1. Run CopyQ server
  2. Copy some text to clipboard from any application
  3. Paste the text anywhere - this works fine, no delay
  4. Run copyq show to open the GUI
  5. Select the first item (the one just copied)
  6. Immediately attempt to paste it (within 1 second) - CopyQ freezes for about 1 second
  7. If you wait longer than 1 second after selecting the item before pasting, no freeze occurs

Expected behavior

Selecting an item from CopyQ and immediately pasting it should work without any delay or freeze.

Version, OS and Environment

  • CopyQ master branch (latest commit before bisect)
  • OS: Debian GNU/Linux 13 (trixie) x86_64
  • Kernel: Linux 6.12.38+deb13-amd64
  • WM: Sway 1.10.1 (Wayland)
  • Pure Wayland environment (XWayland disabled)

Additional context

Bisecting the issue identified two problematic commits:

  • c55fcb2c (Wayland: Fix accessing own clipboard)
  • bfe76c16 (Wayland: Fix crash when getting own clipboard data)

Reverting these commits fixes the issue completely - selecting and pasting works fluently with no warnings or freezes.

During the freeze, the following warnings appear in the log:

Warning: [default] QtWarning: DataControlOffer: timeout reading from pipe
Warning: ELAPSED 1010 ms accessing [data:text/plain]
Warning: ELAPSED 1012 ms accessing [UTF8:text/plain]
Warning: [default] QtWarning: DataControlOffer: timeout reading from pipe
Warning: ELAPSED 1011 ms accessing [:imageData]

贡献者指南