hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.25k stars 430 forks source link

Clicking on an item in the drop-down list pastes to emacs window automatically instead of previous active window #2607

Open todisorder opened 5 months ago

todisorder commented 5 months ago

Before creating a new issue, see list of known issues.

Describe the bug A clear and concise description of what the bug is.

On Ubuntu, with CopyQ setting resetted, when I click on an item in the clipboard list, the item is automatically pasted into an open emacs window, if one is open. This happens even if the last active window is another application.

To Reproduce Steps to reproduce the behavior:

  1. Have the cursor in an active text field on any app (not emacs) where you want to paste to. Have the CopyQ settings resetted previously.
  2. Click on the CopyQ icon in the ubuntu menu bar at the top right of the screen to show a drop-down with the clipboard hystory.
  3. Click on any item, presumably not nr.1, otherwise I would have simply pasted the clipboard contents.
  4. Instantly, the clicked item is pasted into an emacs window that was open in the background, which was not the previous active window.

Expected behavior A clear and concise description of what you expected to happen.

I would expect that clicking on, say, item 3. in the clipboard history would either bring it to the fron of the clipboard (so that Ctrl-V would now paste it), or paste it directly into the active window, depending on settings. But not always pasting it directly into a background emacs window, regardless of settings. NB: to repeat, this happens even right after resetting the settings.

Screenshots If applicable, add screenshots to help explain your problem.

Version, OS and Environment (Get details from copyq version command if possible.)

Additional context Thank you for your development.