flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
23.92k stars 1.52k forks source link

Don't initialize Notifications dbus if disabled #3598

Open insunaa opened 1 month ago

insunaa commented 1 month ago

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

Only 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.

untainsYD commented 1 month ago

I do vote for this PR, it's essential to fix it!