Raising Windows
David Edmundson
david at davidedmundson.co.uk
Thu Jun 9 12:51:56 CEST 2011
I'm working on the KDE Telepathy project (an IM client) and need some
advice when it comes to raising windows.
We had a bug request saying "when the user clicks on a person in the
contact list that conversation window should be brought to the front".
Which I agree with and sounds sensible enough.
The problem is that due to the design of telepathy the contact list
and the window that displays a chat work as two completely separate
applications, with communication over dbus.
In my chat application I've tried:
QWidget::activate() ; - nothing happens
KWindowSystem::activateWindow(); - nothing happens
KWindowSystem::forceActiveWindow(); - works perfectly
However the documentation for KWindowSystem::forceWindowAcitve implies
that it's very naughty to use it.
I assume for the other two, KWin is suppressing my call to activate
the window (though I'm guessing here) because you think the user is
busy using a different application. Even though in reality it's all
part of the same suite.
What should I do here? Can I use forceWindowActive()? Is there
something else I could be missing.
Thanks in advance
David Edmundson
More information about the KDE-Telepathy
mailing list