Raising Windows

Thomas Lübking thomas.luebking at gmail.com
Thu Jun 9 20:17:36 BST 2011

Am Thu, 9 Jun 2011 15:38:01 +0100
schrieb David Edmundson <david at davidedmundson.co.uk>:

> > For the beginning, try KWindowSystem::setMainWindow() what will
> Thanks, unfortunately that doesn't really fit our needs.

Unfortunately you'll have to walk the "stoney" road then, using
XSetWMHints and set window_group of the XWMHints struct.

To do so, you'd first get it on all relevant windows:

XWMHints *hints = XGetWMHints ( QX11Info::display(),
this->QWidget::winId() );

then change it:
hints->window_group = common_value;

then set it:
XSetWMHints( QX11Info::display(),
this->QWidget::winId(), hints );

This is of course not portable at all.

"common_value" should be some global hook, preferably the ID of a
persistant window of your group on which presence you can rely (from
some application core?)
Do NOT(!) abuse the root window for this.

The winId doesn't have to be real (for this specific occasion) but that
might very well lead to trouble elsewhere (or cause random clashes if
the winId actually exists)

To align it among your nodes, you could either use dbus or store a
custom property on the root window (yes, that's ok this time ;-)

kwin mailing list
kwin at kde.org

More information about the kde mailing list