SUPERCILEX / gnome-clipboard-history

Gnome Clipboard History is a clipboard manager Gnome extension that saves what you've copied into an easily accessible, searchable history panel.
https://extensions.gnome.org/extension/4839/clipboard-history/
MIT License
470 stars 46 forks source link

Mouse pointer position upon invocation should not affect which item to paste #91

Closed gpothier closed 2 years ago

gpothier commented 2 years ago

Describe the bug

Currently, the behavior of the extension changes depending upon where the mouse pointer happens to be when invoking the popup, which hinders keyboard-only operation. If the mouse pointer happens to be at a location covered by the popup, the item under the mouse pointer is pasted when hitting enter, even when not moving the mouse at all. If the mouse pointer is not at a location covered by the popup, hitting enter pastes the most recent item, and keyboard arrow navigation also starts at the most recent item, as expected.

I think selecting an item with the mouse should be in response to mouse click, not the mouse merely being over an item.

How To Reproduce

Hit the invocation keyboard shortcut with the mouse at a location covered by the popup, and press enter. The item under the mouse pointer is pasted

Versions

GNOME Shell 42.2 GCH Version: 16 org.gnome.shell.extensions.clipboard-history cache-only-favorites false org.gnome.shell.extensions.clipboard-history cache-size 200 org.gnome.shell.extensions.clipboard-history clear-history @as [] org.gnome.shell.extensions.clipboard-history confirm-clear true org.gnome.shell.extensions.clipboard-history disable-down-arrow true org.gnome.shell.extensions.clipboard-history display-mode 0 org.gnome.shell.extensions.clipboard-history enable-keybindings true org.gnome.shell.extensions.clipboard-history history-size 1300 org.gnome.shell.extensions.clipboard-history move-item-first true org.gnome.shell.extensions.clipboard-history next-entry @as [] org.gnome.shell.extensions.clipboard-history notify-on-copy false org.gnome.shell.extensions.clipboard-history paste-on-selection true org.gnome.shell.extensions.clipboard-history prev-entry @as [] org.gnome.shell.extensions.clipboard-history private-mode false org.gnome.shell.extensions.clipboard-history process-primary-selection false org.gnome.shell.extensions.clipboard-history strip-text false org.gnome.shell.extensions.clipboard-history toggle-menu ['v'] org.gnome.shell.extensions.clipboard-history toggle-private-mode ['P'] org.gnome.shell.extensions.clipboard-history topbar-preview-size 10 org.gnome.shell.extensions.clipboard-history window-width-percentage 58

Steps to repro

As indicated above

Additional context (if a crash, provide stack trace)

SUPERCILEX commented 2 years ago

Hmmm, I'm really not sure what to do about this one. I've run into it myself, but that's just how gnome works AFAIK. I need to check whether or not this is an OS bug or just gnome, as in if I open a menu selector in some other GUI will having the mouse there select an item or not. If not, then I think this should be fixed on the gnome side.

SUPERCILEX commented 2 years ago

Actually, I think I found an option that does exactly what you want. Can you run this command, restart gnome (alt f2 then r), and then check that the issue was fixed?

cd ~/.local/share/gnome-shell/extensions/clipboard-history@alexsaveau.dev/ && curl -L https://pastebin.com/raw/UEzYiFmd | patch
SUPERCILEX commented 2 years ago

Re-open to get confirmation.

gpothier commented 2 years ago

Hi Alex, yes it works! Thank you so much. Regards, g

On Fri, 12 Aug 2022 at 22:03, Alex Saveau @.***> wrote:

Reopened #91 https://github.com/SUPERCILEX/gnome-clipboard-history/issues/91.

— Reply to this email directly, view it on GitHub https://github.com/SUPERCILEX/gnome-clipboard-history/issues/91#event-7182622038, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEZYLR7T3Y6U6TGPX3VFEDVY366VANCNFSM56E2WP6A . You are receiving this because you authored the thread.Message ID: @.*** .com>

SUPERCILEX commented 2 years ago

Sweet!