Bug 422262 - dbus /Windows/1 org.kde.konsole.Window.setCurrentSession doesn't changes session
Summary: dbus /Windows/1 org.kde.konsole.Window.setCurrentSession doesn't changes session
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 20.04.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-30 17:21 UTC by Gabor
Modified: 2021-04-27 07:42 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor 2020-05-30 17:21:21 UTC
SUMMARY
Maybe I am wrong and in this case I am sorry.
Trying to change the active Session in Konsole by Session id with:
dbus-send --dest=org.kde.konsole --type=method_call /Windows/1 org.kde.konsole.Window.setCurrentSession int32:2

simply doesn't work, just the current session lost it's focus.

however the following works:
dbus-send --dest=org.kde.konsole --type=method_call --print-reply=literal /Windows/1 org.kde.konsole.Window.nextSession

STEPS TO REPRODUCE
1. open konsole with at least two tabs
2. select other than second
3. try to move to the second tab with the above (first) command

OBSERVED RESULT
active session doesn't changes just current session lost it's focus (outlined cursor)


EXPECTED RESULT
change the session

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Manjaro
(available in About System)
KDE Plasma Version:  5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Comment 1 Dylan Frese 2020-07-01 04:26:37 UTC
I can confirm this behaviour. I had a script that would open a text file in vim (from Dolphin etc.) and automatically switch to the Konsole window and to the right tab. This was working some time ago, but does not any more.

I'm on Debian Bullseye, Konsole 19.08.1, KDE Frameworks 5.70.0, Plasma version 5.17.5-3.
Comment 2 Nicolas Girard 2020-11-07 23:21:57 UTC
Fixing this defect would bring a solution to bug 298775.
Comment 3 Bug Janitor Service 2020-11-08 21:54:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/266
Comment 4 Carlos Alves 2020-11-11 02:26:12 UTC
Git commit 5f006d89af917df049a754030caa7fe96b1c61dc by Carlos Alves.
Committed on 10/11/2020 at 17:17.
Pushed by hindenburg into branch 'master'.

Fix dbus setCurrentSession focus

It was only giving focus to terminal but not the tab.
FIXED-IN: 20.12

M  +5    -0    src/ViewManager.cpp

https://invent.kde.org/utilities/konsole/commit/5f006d89af917df049a754030caa7fe96b1c61dc
Comment 5 Kurt Hindenburg 2020-11-11 14:08:37 UTC
Git commit 67a41ea6c79e209a660c27277d80b3ddcd897a3f by Kurt Hindenburg, on behalf of Carlos Alves.
Committed on 11/11/2020 at 14:03.
Pushed by hindenburg into branch 'release/20.12'.

Fix dbus setCurrentSession focus

It was only giving focus to terminal but not the tab.
FIXED-IN: 20.12
(cherry picked from commit 5f006d89af917df049a754030caa7fe96b1c61dc)

M  +5    -0    src/ViewManager.cpp

https://invent.kde.org/utilities/konsole/commit/67a41ea6c79e209a660c27277d80b3ddcd897a3f