p0deje / Maccy

Lightweight clipboard manager for macOS
https://maccy.app
MIT License
12.58k stars 532 forks source link

When pasting a text in tan app on a secondary monitor, the text goes to the app on the main monitor #691

Closed soberano closed 8 months ago

soberano commented 10 months ago

Before Submitting Your Bug Report

Maccy Version (see 'About' window)

0.29.2 (26)

macOS Version

14.1.2 (23B92)

Maccy Settings

{
    "KeyboardShortcuts_delete" = "{\\"carbonKeyCode\\":51,\\"carbonModifiers\\":2048}";
    "KeyboardShortcuts_pin" = "{\\"carbonKeyCode\\":35,\\"carbonModifiers\\":2048}";
    "KeyboardShortcuts_popup" = "{\\"carbonKeyCode\\":8,\\"carbonModifiers\\":768}";
    "LaunchAtLogin__hasMigrated" = 1;
    "NSWindow Frame SUStatusFrame" = "2851 698 400 134 1800 89 1920 1055 ";
    "NSWindow Frame SUUpdateAlert" = "2450 581 620 398 1800 89 1920 1055 ";
    "NSWindow Frame com.sindresorhus.Settings.FrameAutosaveName" = "629 652 442 322 0 0 1800 1125 ";
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2023-12-05 11:19:29 +0000";
    SUUpdateGroupIdentifier = 1532164247;
    WebKitDefaultFontSize = 13;
    WebKitJavaScriptEnabled = 0;
    WebKitPluginsEnabled = 0;
    WebKitStandardFont = "-apple-system-font";
    WebKitUserStyleSheetEnabledPreferenceKey = 1;
    WebKitUserStyleSheetLocationPreferenceKey = "/Applications/Maccy.app/Contents/Frameworks/Sparkle.framework/Resources/ReleaseNotesColorStyle.css";
    enabledPasteboardTypes =     (
        "public.html",
        "public.png",
        "public.rtf",
        "public.tiff",
        "public.utf8-plain-text",
        "public.file-url"
    );
    ignoredPasteboardTypes =     (
        "com.agilebits.onepassword",
        "de.petermaurer.TransientPasteboardType",
        "net.antelle.keeweb",
        "Pasteboard generator type",
        "com.typeit4me.clipping"
    );
    migrations =     {
        "2020-04-25-allow-custom-ignored-types" = 1;
        "2020-06-19-use-keyboardshortcuts" = 1;
        "2020-09-01-ignore-keeweb" = 1;
        "2021-02-20-allow-to-customize-supported-types" = 1;
        "2021-06-28-add-title-to-history-item" = 1;
        "2021-10-16-remove-dynamic-pasteboard-types" = 1;
        "2022-08-01-rename-suppress-clear-alert" = 1;
        "2022-11-14-add-html-rtf-to-supported-types" = 1;
        "2023-01-22-add-regexp-search-mode" = 1;
    };
    pasteByDefault = 1;
    previewDelay = 1000;
}

Description

When running two windows of the same application in different monitors (built-in mac and external) and trying to paste a text to an application on a secondary monitor, the text goes to the same application on the main monitor.

For example, if I have two terminal windows on two different monitors, and I try to paste into the terminal window on the secondary monitor, the text is being pasted into the terminal window on the main monitor. This happens in other applications as well, such as Google Chrome and Microsoft Excel.

Steps to Reproduce

Open 2 windows of the same application in main and secondary monitors, for example iTerm Copy a text into clipboard Focus on the instance on the secondary monitor Press Command-Shift-C and select an entry to paste Pasted text goes to the application instance in the main monitor (built-in monitor in my case) and the focus switches to it as well.

If both app windows are on the same monitor (main or secondary) the the pasted text goes to the focused instance as expected.

p0deje commented 8 months ago

I cannot reproduce this on macOS 14.3 with iTerm having the following displays:

Untitled Untitled1

Having 2 iTerm windows on separate screens, paste always goes to the last focused one.

Please try on the latest macOS and re-open if it doesn't work still.

dszymczuk commented 2 months ago

Hi.

I have the same issue. I have opened Visual Studio Code on the 1st (built-in) and 2nd monitor (external). When I tried to paste in VSC on the external monitor, the text was pasted in VSC on 1st monitor.

It's ultra annoying.

MacOS: Sonoma 14.5
Maccy: Version 1.0.0 (31)

My arrangement:

Screenshot 2024-07-24 at 10 13 17