Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy_on_select doesn't work without first focusing Kitty #6095

Closed
mburz opened this issue Mar 6, 2023 · 4 comments
Closed

copy_on_select doesn't work without first focusing Kitty #6095

mburz opened this issue Mar 6, 2023 · 4 comments
Labels

Comments

@mburz
Copy link

mburz commented Mar 6, 2023

Given the following configuration in Kitty:

copy_on_select clipboard
mouse_map left click ungrabbed no-op
mouse_map left press ungrabbed mouse_selection normal

copy_on_select works as expected, when Kitty is focused.
When the focus resides on a different application, selecting text with the mouse inside of Kitty will also focus Kitty, and the text selection works as expected, but the selected text is not copied to the clipboard or primary selection. Same feature works as expected using other terminals. First clicking on Kitty then selecting the text also works as expected.

The issue is reproducible using kitty 0.21.2 bundled with Ubuntu and kitty 0.27.1 released on GitHub.
The issue is also reproducible using kitty --config NONE with both of these versions.
Tried on Ubuntu 22.04 and 22.10.

@mburz mburz added the bug label Mar 6, 2023
@page-down
Copy link
Contributor

I can reproduce this under Wayland and it works fine under x11.

After selecting the text and releasing the mouse button, I see:

Release mouse_button: 0 mods: none grabbed: 0
on_mouse_input: release button: left mods: none grabbed: 0 handled_in_kitty: 0

However it should be:

Release mouse_button: 0 mods: none handled as drag end

So mouse.c->end_drag() is not called, screen.c->self->selections.in_progress will always be true, and call_boss(set_primary_selection, NULL) will not be executed.
After the mouse button is released, screen_update_selection() is run over and over again.

@kovidgoyal
Copy link
Owner

Works for me in GNOME wayland (mutter 43.3) . Steps I tried:

  1. kitty -o 'copy_on_select clipboard'
  2. focus another window
  3. drag some text in the kitty window from step 1
  4. paste from clipboard in another application. works as expected.

Which compositor and version are we talking of? Given wayland's brain dead design saying "Wayland" is pretty useless.

@page-down
Copy link
Contributor

Which compositor and version are we talking of? ...

KDE kwin 5.27.2

@mburz
Copy link
Author

mburz commented Mar 7, 2023

Thanks for the fix, will try it out when the next release comes out.
I'm running i3 under X11, so not sure the issue is Wayland related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants