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
458 stars 44 forks source link

It show a notification when i close any app i copied an text from it #187

Open IslamMohammedSalama opened 1 week ago

IslamMohammedSalama commented 1 week ago

Describe the bug

When I copy a text from any app (for example gnome-text-editor) and close this app it it shows a notification "copied to clipboard" if I close this app.

❯ gnome-shell --version; echo -n "GCH "; gnome-extensions show clipboard-history@alexsaveau.dev | grep Version; gsettings --schemadir ~/.local/share/gnome-shell/extensions/clipboard-history@alexsaveau.dev/schemas list-recursively org.gnome.shell.extensions.clipboard-history
GNOME Shell 46.0
GCH   Version: 45
org.gnome.shell.extensions.clipboard-history cache-only-favorites false
org.gnome.shell.extensions.clipboard-history cache-size 100
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 1000
org.gnome.shell.extensions.clipboard-history ignore-password-mimes false
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 true
org.gnome.shell.extensions.clipboard-history paste-on-selection false
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 ['<Super><Shift>V']
org.gnome.shell.extensions.clipboard-history toggle-private-mode ['<Super><Shift>P']
org.gnome.shell.extensions.clipboard-history topbar-preview-size 10
org.gnome.shell.extensions.clipboard-history window-width-percentage 33

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:    24.04
Codename:   noble

video of this bug : https://github.com/user-attachments/assets/ec1d472c-1b11-4e48-bf59-f4add67562b1 my software and hardware information of my device : https://github.com/user-attachments/assets/466890f5-0437-4af1-8c5c-ee38af866562

SUPERCILEX commented 1 week ago

Closing the app causes the compositor to take over selection ownership (in this case gnome). Presumably we're still sending out a notification even if the new data is identical to the current clipboard entry. Should be easy to fix by ignoring duplicate selection notifications if anybody wants to send a PR.