volkov closed this revision.
REPOSITORY
R102 KInfoCenter
REVISION DETAIL
https://phabricator.kde.org/D12760
To: volkov, #plasma, mart
Cc: mart, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed,
jensreuterberg, abetts, sebas, apol
volkov added inline comments.
INLINE COMMENTS
> mart wrote in main.cpp:71
> KWindowSystem::forceActiveWindow should never be used by normal applications,
> it's reserved for workspaces and won't work on Wayland.
> QWidget::activateWindow should be enough, even if that's not guaranteed to
> actu
volkov added a comment.
The documentation of KDBusService recommends to use it:
https://api.kde.org/frameworks/kdbusaddons/html/classKDBusService.html#af0ad38f597aedaf22a30045d0423ed0e
And many applications do it:
https://lxr.kde.org/search?_filestring=&_string=forceActiveWindow
REPOSITO
mart added inline comments.
INLINE COMMENTS
> main.cpp:71
> +connect(service, &KDBusService::activateRequested, this, [this]() {
> +KWindowSystem::forceActiveWindow(display->winId());
> +});
KWindowSystem::forceActiveWindow should never be used by normal applications,
it's reser
volkov created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
volkov requested review of this revision.
REVISION SUMMARY
1. Avoid showing the window of the second instance by creating KDBusService
object before creating th