TabBox based window strip

Martin Gräßlin mgraesslin at kde.org
Thu Dec 1 07:52:20 UTC 2011


On Tuesday 29 November 2011 07:04:01 Martin Gräßlin wrote:
> I realized we only need one atom for the sticky window. Everything else we
> can do through DBus. I'll add another method:
> void openEmbedded(qulonglong wid, QRect geometry);
> This could be invoked by the panel and it connects to the tabBoxClosed()
> signal which gets emitted when the user clicks an item. That way we don't
> have to fiddle around with setting the atoms & co.
Just did that and pushed the changes. Code snippet how to use:
QDBusMessage msg = QDBusMessage::createMethodCall("org.kde.kwin", "/TabBox", 
"org.kde.kwin", "openEmbedded");
QList<QVariant> vars;
vars.append(QVariant::fromValue<qulonglong>(winId()));
vars.append(QVariant::fromValue<QPoint>(QPoint(100, 100)));
vars.append(QVariant::fromValue<QSize>(QSize(1000, 150)));
vars.append(QVariant::fromValue<int>(Qt::AlignLeft));
vars.append(QVariant::fromValue<int>(Qt::AlignBottom));
msg.setArguments(vars);
QDBusConnection::sessionBus().call(msg);

This creates the TabBox embedded with a size of 1000x150 aligned to the bottom 
left corner with an offset of 100/100. This means moving/resizing the window 
will result in TabBox moving as well. So just one DBus call required. Please 
delay the call till the window is shown.

Now only the sticky window is missing.

Cheers
Martin
> 
> Cheers
> Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/active/attachments/20111201/f5aed86e/attachment.sig>


More information about the Active mailing list