Refactor Spectacle to run in single instance mode with KDBusService::Unique

Authored by meven on Jun 5 2020, 8:26 AM.

Description

Refactor Spectacle to run in single instance mode with KDBusService::Unique

Summary:
Since Spectacle got DBus activation support in 09cd11881d828da35c46c48da79f2d988e6a78cc, it has been run in multiple instance mode.
But it has been shaddowed by using qbus ee862d161a480408338d00b8826c915f7a97575c in the desktop file to mimic singleton behavior.

This refactors Spectacle to run in true single instance mode using KDBusService::Unique.
This is to allow Spectacle to have its executable in its Exec desktop Entry, to allow KWin to match the executable to the service file, itself to allow screenshots under Wayland without intermediate click.

The listed bugs are fixed incidently except for 414739 where a simple fix was added in screenShotUpdated.

BUG: 420477
BUG: 414739

CCBUG: 412186

Test Plan:
Start spectacle, alternatively, from shortcut, command line.
Take screenshots, from alternative ways.

There is always at most one Spectacle window unless launched with --new-instance.

Reviewers: davidre, ngraham, bport, davidedmundson, apol

Reviewed By: davidre

Subscribers: broulik, anthonyfieroni, Spectacle

Tags: Spectacle

Differential Revision: https://phabricator.kde.org/D29487

Details

Committed
mevenJun 5 2020, 9:10 AM
Reviewer
davidre
Differential Revision
D29487: Refactor Spectacle to run in single instance mode with KDBusService::Unique
Parents
R166:246ac1f87d52: Fix clazy warning
Branches
Unknown
Tags
Unknown