- Avoid showing the window of the second instance by creating KDBusService object before creating the window object.
- Activate the window on the second start.
- Group Reviewers
- R102:cc3e7450b506: Improve single-instance application behavior
KWindowSystem::forceActiveWindow should never be used by normal applications, it's reserved for workspaces and won't work on Wayland.
The documentation of KDBusService recommends to use it: