Bug 332532 - app wtih KDBusService::Unique window not raised when started again
Summary: app wtih KDBusService::Unique window not raised when started again
Alias: None
Product: frameworks-kdbusaddons
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
Depends on:
Reported: 2014-03-24 23:26 UTC by Sebastian Kügler
Modified: 2014-05-07 11:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Kügler 2014-03-24 23:26:03 UTC
Windows of KUniqueApplications are not raised when started while running. In this case, the window manager should raise the existing window. Right now, nothing happens, the call to start just fails as the application is already running.

This is a regression from KDE SC 4.

Reproducible: Always

Steps to Reproduce:
1. Start systemsettings
2. Switch to any other window, so systemsettings is not focused anymore
3. Open Kickoff, start systemsettings
Actual Results:  
Nothing happens

Expected Results:  
Existing systemsettings window should be raised.

I suppose the code to switch to the current app got lost, so it needs to be re-applied or re-invented for KF5. Likely a frameworkintegration bug.
Comment 1 David Edmundson 2014-03-27 15:23:07 UTC
KUniqueApplication doesn't exist. 

Updating title and reassigning to relevant frameworks.
Comment 2 Sebastian Kügler 2014-05-06 14:36:16 UTC
https://git.reviewboard.kde.org/r/118019/ has a partial fix.
Comment 3 Sebastian Kügler 2014-05-07 11:51:24 UTC
Git commit 7446dacc1a58b3c00223ef943929b0ade388429a by Sebastian Kügler.
Committed on 07/05/2014 at 11:47.
Pushed by sebas into branch 'master'.

Update window timestamp before activating from dbusservice

This patch, conditionally on X11, updates the window's timestamp before
activating the window. This is needed for kwin to bring a unique app
window to the front when a second instance is started (which activates
the first one).

Partial fix for (needs small adaption in systemsettings as well):


M  +7    -0    CMakeLists.txt
M  +3    -2    src/CMakeLists.txt
A  +1    -0    src/config-kdbusaddons.h.cmake
M  +11   -0    src/kdbusservice.cpp

Comment 4 Sebastian Kügler 2014-05-07 11:59:06 UTC
Git commit 2b822a06cb004e367dcc0f1985dd41c1137a4d96 by Sebastian Kügler.
Committed on 07/05/2014 at 11:55.
Pushed by sebas into branch 'master'.

Bring window to front when second instance would be started

This install a handler to KDBusService::activateRequested which brings
up the systemsettings window when a second instance is started.

Needs 7446dacc1 from kdbusaddons to be effective.

M  +4    -1    app/SystemSettingsApp.cpp