Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sender parameter of .signal_subscribe #1813

Merged
merged 1 commit into from
May 28, 2024
Merged

Conversation

JingMatrix
Copy link
Contributor

Note: this fix is intented for gsconnect users without GNOME installed.

Recently, it seems that one cannot acquire a proper sender name automatically when using dbus-send command in a Gio.Subprocess. The command is issued in wl_clipboard.js:

wl-paste -w dbus-send /org/gnome/Shell/Extensions/GSConnect/Clipboard --dest=org.gnome.Shell.Extensions.GSConnect.Clipboard org.gnome.Shell.Extensions.GSConnect.Clipboard.OwnerChange

To fix this issue, we have to set the sender parameter of the method Gio.DBusConnection.signal_subscribe to be null.
See docs at: https://docs.gtk.org/gio/method.DBusConnection.signal_subscribe.html

Note: this fix is intented for gsconnect users without GNOME installed.

Recently, it seems that one cannot acquire a proper sender name
automatically when using `dbus-send` command in a Gio.Subprocess.
The command is issued in wl_clipboard.js:
```
wl-paste -w dbus-send /org/gnome/Shell/Extensions/GSConnect/Clipboard --dest=org.gnome.Shell.Extensions.GSConnect.Clipboard org.gnome.Shell.Extensions.GSConnect.Clipboard.OwnerChange
```

To fix this issue, we have to set the sender parameter of the method
Gio.DBusConnection.signal_subscribe to be null.
See docs at: https://docs.gtk.org/gio/method.DBusConnection.signal_subscribe.html
Copy link
Member

@ferdnyc ferdnyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this since @JingMatrix says it works, the code looks fine, and even if it isn't the only thing it could possibly break is the CLI mode.

@ferdnyc ferdnyc merged commit b5a325e into GSConnect:main May 28, 2024
2 checks passed
@ferdnyc ferdnyc added this to the v58 milestone Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants