Skip to content

Can't paste in some situations when using Wayland #4183

Closed
@mdeneen

Description

@mdeneen

Describe the bug
Paste function does not always paste

To Reproduce
Steps to reproduce the behavior:

  1. Copy from a Wayland application, such as Geany
  2. run wl-paste, you can see that the contents are in the buffer
  3. Try to paste into Kitty (nothing happens)

Screenshots
Copying:
image

Attempting to paste (nothing happens) and you can see the contents with wl-paste
image

Environment details

kitty 0.23.1 created by Kovid Goyal
Linux mdeneen 5.14.15-arch1-1 #1 SMP PREEMPT Wed, 27 Oct 2021 23:38:14 +0000 x86_64
Arch Linux \r (\l)
LSB_VERSION=1.4
DISTRIB_ID=Arch
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Arch Linux"
Running under:Wayland
Loaded config files:
  /home/mdeneen/.config/kitty/kitty.conf

Config options different from defaults:
term xterm-256color

Additional context

Using wl-copy within kitty and then pasting will work until a selection is copied in Geany, at which point nothing happens when I paste. Executing wl-paste | wl-copy allows me to paste the content which was previously copied in Geany.

image

Copying data from geany to other Wayland terminal emulators, such as gnome-terminal, works as expected.

I also noticed that when copying from geany, the offered types are:

wl-paste -l
STRING
UTF8_STRING

but when copying from Kitty itself, these types are offered:

UTF8_STRING
STRING
TEXT
text/plain;charset=utf-8
text/plain
application/glfw+clipboard-36277

I have a feeling that this is the root of my problem.

Incidentally, STRING/UTF8_STRING are the only offers from Java-based applications as well. These Java applications also do not paste into Kitty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions