On Sonntag, 9. August 2015 21:39:37 CEST, Boudhayan Gupta wrote:
Do I have to do it the xcb way (get an atom, call xcb_change_property() and
all - and does this property even have an atom)

Yes - "unfortunately". I filed bug 351137 about this, but notice that any resolution will 
require a somewhat fixed idea about "property" handling on wayland.

If there's sample code I can refer to, all the better
Here it comes:
#if HAVE_X11 // you need to provide such macro from cmake if you want to 
support X-less build

xcb_connection_t *c = QX11Info::connection();
if (!c) {
  return;
}
const QByteArray effectName = 
QByteArrayLiteral("_KDE_NET_WM_SKIP_CLOSE_ANIMATION");
xcb_intern_atom_cookie_t atomCookie = xcb_intern_atom_unchecked(c, false, 
effectName.length(), effectName.constData());
QScopedPointer<xcb_intern_atom_reply_t, QScopedPointerPodDeleter> 
atom(xcb_intern_atom_reply(c, atomCookie, nullptr));
if (!atom) {
  return;
}
uint32_t value = 1;
xcb_change_property(c, XCB_PROP_MODE_REPLACE, winId(), atom->atom, 
XCB_ATOM_CARDINAL, 32, 1, &value);
#if // HAVE_X11
You will want to do this before (might have to call QWindow::create() to get a 
winId() != 0) or during the show event (ie. *before* the window gets managed)

Depending on your requirements, you may want to use a static 
xcb_intern_atom_reply_t pointer instead etc.

Cheers,
Thomas

Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to