snark / jumpcut

Minimalist clipboard management for macOS
https://snark.github.io/jumpcut
MIT License
625 stars 62 forks source link

When using 2 screens, app pastes to the main screen Chrome window #95

Open kentoforik2 opened 1 year ago

kentoforik2 commented 1 year ago

STR:

  1. Open Chrome1 window on screen 1 (Main monitor).
  2. Open Chrome2 window on screen 2 (Another connected monitor).
  3. Focus on Chrome2 window -> Call Bezel -> Paste.

AR: Chrome1 window activated, nothing pasted. ER: Data pasted to the Chrome2 window.

ENV: MacOS Sonoma 14.1, Chrome 118.0.5993.117

snark commented 11 months ago

For Chrome (and Chromium-based/Electron applications such as VSCode), I believe this is the result of a bug in Chrome's windowing code. See https://github.com/snark/jumpcut/issues/87 and https://github.com/p0deje/Maccy/issues/534. That said, this sounds super annoying, so I'll spend some time to see if I can determine any workarounds. (Jumpcut is simply removing itself as the front-facing app; something in Chrome is going wrong when determining what window to then bring to the front.)

vkgiri11 commented 8 months ago

Any updates/workaround on this one?

snark commented 8 months ago

@vkgiri11 Last time I looked at this it seemed to be directly a Chrome (and Chromium/Electron)-related bug; I haven't gone back in to see if there's anything I can do to work around it but nothing came to mind in December. (Happy to hear suggestions! The way it works under the hood is simply that Jumpcut is resigning as frontmost application and letting the previous application, Chrome, take back over, but then the wrong window is getting focus due to the Chrome issue.) Given the heavy prevalence of a) Chrome and b) VSCode among Jumpcut users, I'm sure it's frustrating. I'll take a look at what Maccy did, however, since in https://github.com/p0deje/Maccy/issues/534 it sounds like they made changes that improved the behavior for at least some people.