Don't initialize Notifications dbus if disabled #3598
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where Flameshot hangs while it's waiting for the notifications QDBusInterface to initialize.
Some systems don't come with a notifications daemon by default, which causes the QDBusInterface constructor to block for 5-20 seconds, during which flameshot hangs and cannot copy the screenshot into the clipboard buffer.
I tested this on Linux on KDE Plasma 6 with Wayland enabled. CMake flags are
cmake .. -GNinja -DUSE_WAYLAND_CLIPBOARD=1
might fix Hyprland Wayland Copy to Clipboard doesn't work #3529might fix Screenshots aren't copied to the clipboard #3479Only might fix, because the assumption is that the issue names are misnomers, and that the true issue is just that the screenshot is copied to clipboard after 5-20 seconds without any hint (except systemd logs)Edit: Ignore the potentially fixed issues, there are more things afoot with those.