Maccy icon indicating copy to clipboard operation
Maccy copied to clipboard

Clipboard not appear in right place when I call it use shortcut.

Open ghost opened this issue 2 years ago • 3 comments

Such as I set clipboard in screen center, but it appear in an unexpected place (random place and not in center).

It usually happend after without call clipboard out for a long time, and it just unnormal once, next call in a short time will normal. Until again a long time without calling, problem will happened again.

I don't know how to reproduce this problem, same problem on other user?

Mac

Apple M1 Pro

12.6

Maccy

0.24.0(13)

shotcut: option + c

ghost avatar Sep 22 '22 03:09 ghost

I'll switch to use "Screen center" and will try to reproduce the bug. Do you use just one display?

p0deje avatar Sep 22 '22 17:09 p0deje

I'll switch to use "Screen center" and will try to reproduce the bug. Do you use just one display?

Just built-in display.

I reproduce this bug just now, clipboard appear in screen center top when the first call after each restart Maccy (same place each time, like below screenshot), second call is normal.

image

But after I clear my clipboard, I cant reproduce it right now. After a while (or after I copied enough objects) I can reproduce it again, but this time it appear in another place. (a little above the center, like below screenshot). It's exactly the same as last reproduce, except it's appear in a different place.

image

I think this may be the same bug as the one I raised at the beginning. There is no doubt that the clipboard window appear in screen center works not normal.

ghost avatar Sep 23 '22 06:09 ghost

Another question: Is the window right in the center? When I use window manager tool magent to make the clipboard center, the window move a little. When I move my pointer it will back to original place.

Which place is right center?

maccy_not_center

ghost avatar Sep 23 '22 07:09 ghost

Hey @p0deje , I canceled my old account "shineshane". "rea1shane" is my current account. If you have any new ideas about these issues, plz @ this acoount. Sorry for the inconvenience.

If you want to know some details that I didn't describe clearly before, you can reply to me or hit me up @discord: rea1shane#6075.

Thank you.

rea1shane avatar Oct 18 '22 05:10 rea1shane

Another question: Is the window right in the center? When I use window manager tool magent to make the clipboard center, the window move a little. When I move my pointer it will back to original place.

There is 1x1 offset which is hardcoded - I don't recall why exactly I added it but it was to handle some edge case. https://github.com/p0deje/Maccy/blob/master/Maccy/NSRect%2BCentered.swift#L11

p0deje avatar Oct 20 '22 15:10 p0deje

I'll switch to use "Screen center" and will try to reproduce the bug.

Any progress? Recently I still have this problem repeatedly. And my shotcut is default now: cmd + shift + c

image

Just like this. Two display are used now, and screenshot is external display. Of course, one display will also have this issue.

rea1shane avatar Oct 20 '22 15:10 rea1shane

No, still can't reproduce the problem. Could you please share the output of running defaults read org.p0deje.Maccy in Terminal.app?

p0deje avatar Oct 20 '22 16:10 p0deje

Could you please share the output of running defaults read org.p0deje.Maccy in Terminal.app?

{
    "KeyboardShortcuts_popup" = "{\\"carbonModifiers\\":768,\\"carbonKeyCode\\":8}";
    "NSStatusItem Preferred Position Item-0" = 5394;
    "NSWindow Frame SUStatusFrame" = "700 743 400 134 0 0 1800 1125 ";
    "NSWindow Frame SUUpdateAlert" = "590 545 620 398 0 0 1800 1125 ";
    "NSWindow Frame com.sindresorhus.Preferences.FrameAutosaveName" = "643 543 542 263 0 0 1800 1125 ";
    SUAutomaticallyUpdate = 1;
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2022-10-13 11:21:44 +0000";
    SUUpdateGroupIdentifier = 3766769327;
    WebKitDefaultFontSize = 13;
    WebKitJavaEnabled = 0;
    WebKitJavaScriptEnabled = 0;
    WebKitPluginsEnabled = 0;
    WebKitStandardFont = "-apple-system-font";
    WebKitUserStyleSheetEnabledPreferenceKey = 1;
    WebKitUserStyleSheetLocationPreferenceKey = "/Applications/Maccy.app/Contents/Frameworks/Sparkle.framework/Resources/ReleaseNotesColorStyle.css";
    enabledPasteboardTypes =     (
        "public.file-url",
        "public.png",
        "public.utf8-plain-text",
        "public.tiff"
    );
    fuzzySearch = 0;
    hideFooter = 1;
    hideSearch = 0;
    hideTitle = 1;
    history = {length = 42, bytes = 0x62706c69 73743030 a0080000 00000000 ... 00000000 00000009 };
    historySize = 999;
    ignoredPasteboardTypes =     (
        "com.typeit4me.clipping",
        "com.agilebits.onepassword",
        "Pasteboard generator type",
        "net.antelle.keeweb",
        "de.petermaurer.TransientPasteboardType"
    );
    maxMenuItems = 20;
    migrations =     {
        "2020-02-22-history-item-add-copied-at" = 1;
        "2020-02-22-history-item-add-number-of-copies" = 1;
        "2020-04-18-switch-storage-to-core-data" = 1;
        "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;
    };
    pasteByDefault = 0;
    pinTo = top;
    playSounds = 0;
    popupPosition = center;
    removeFormattingByDefault = 0;
    showRecentCopyInMenuBar = 0;
}

rea1shane avatar Oct 20 '22 16:10 rea1shane

I have tried configuring Maccy exactly the same but still can't reproduce the issue - it always pops up in a proper center of the screen. Screenshot 2022-10-20 at 13 39 22

p0deje avatar Oct 20 '22 20:10 p0deje

This issue does not always appear, often occurring in the call after a long time no call Maccy (I guess, because it makes me feel like this), and always reproduce in the first call after restart Maccy, at least for me.

I also found that there was not more than one wrong position, the offset was either small or large.

Maybe you can try to restart Maccy and see if you have the same issue.

rea1shane avatar Oct 21 '22 02:10 rea1shane

Yes, there is a known bug with the first popup after start. It happens because until the menu pops up for the first time, it's not yet possible to know the menu width/height. Because of that, all the calculations for the position are incorrect.

This however should not happen afterwards.

p0deje avatar Oct 21 '22 15:10 p0deje

I have no idea. Watch for a while longer?

rea1shane avatar Oct 21 '22 16:10 rea1shane

Same issue in macOS 13.0. Is it possible coordinates were lost during running?

rea1shane avatar Oct 27 '22 10:10 rea1shane

Yeah, I suppose sometimes if Maccy runs in the background for a while, it's unloaded from the memory and the menu size is lost similar to the very first time. I'll see if there is a way to work it around.

p0deje avatar Oct 27 '22 13:10 p0deje

I've noticed something similar. In my case 'window center' is buggy and works the same as 'cursor'. For now I'm using 'screen center' which seems to work ok.

miquecg avatar Nov 07 '22 11:11 miquecg

@miquecg It can happen if Maccy cannot detect the size of the currently focused window. Can you create a separate issue with version of Maccy and screen recording.

p0deje avatar Nov 07 '22 13:11 p0deje

Will try to report it later.

miquecg avatar Nov 07 '22 14:11 miquecg

Should work more stable in the next version.

p0deje avatar Feb 17 '23 22:02 p0deje