|Summary:||dbus method org.kde.konsole.Konsole.currentSession always return the active session within the first window, even when the qdbus commnd is executed in some session within the second window.|
|Product:||[Applications] konsole||Reporter:||Gris Ge <cnfourt>|
|Component:||general||Assignee:||Konsole Developer <konsole-devel>|
|Latest Commit:||Version Fixed In:||4.9.0|
Description Gris Ge 2011-09-07 03:09:44 UTC
Comment 1 Jekyll Wu 2011-09-08 13:42:40 UTC
You are right. The problem is that dbus method always return the id of active session in the FIRST window.
Comment 2 Jekyll Wu 2011-10-22 09:39:21 UTC
[Techninal note; normal users can just ignore this comment] The real problem is no matter how many windows are opened in konsole, konsole actually only creates dbus object for the first window. So every dbus method on that dbus object takes effect in the context of the first window. I think that is basically a coding mistake, instead of intentional design. bug 276912 is also influenced by this underlying problem.
Comment 3 Jekyll Wu 2012-02-07 12:06:07 UTC
Comment 4 Jekyll Wu 2012-02-08 17:52:58 UTC
Git commit 07cddfe302233c3555258f077429e55ce622e262 by Jekyll Wu. Committed on 08/02/2012 at 18:49. Pushed by jekyllwu into branch 'master'. Create dbus object for each Konsole window respectively Its naming scheme is "/Windows/N", similar to "/Sessions/N" for sessions. That is not the final decision and might change before next major release. The old "/Konsole" dbus object is still available at this moment, but it might disappear or be used for something different in the future, so it is better to use "/Windows/N" from now on. For convenience, $KONSOLE_DBUS_WINDOW can be used to refer to the dbus object corresponding to the Konsole window containing current session. Note, that environment variable does not work well with detaching and draging. Maybe it should not be added at all. Related: bug 276912, bug 292309 REVIEW:103790 M +2 -0 src/Application.cpp M +5 -0 src/Session.cpp M +2 -0 src/Session.h M +11 -0 src/ViewManager.cpp M +5 -0 src/ViewManager.h http://commits.kde.org/konsole/07cddfe302233c3555258f077429e55ce622e262