Revision ecddd30...

Go back to digest for 30th December 2012

Other in KDE Base

Martin Gräßlin committed changes in [kde-workspace] kwin/xcbutils.h:

Introduce helper classes to perform common xcb requests

Two helper classes WindowGeometry and WindowAttributes which can be
used to request the geometry and attributes more easily. This is based on
a templated class, taking cookieType, replyType and function pointers to
the request and reply functions as template parameters.

The ctor performs the async request and the reply is stored in a
QSharedPointer. Whenever the reply is needed it is checked whether it
has already been retrieved and if not will block by calling the reply
method. The class provides operator bool() to check whether the reply
succeeded (pointer is not null) and operator->() to directly access the
reply pointer.

File Changes

Added 1 files
  • kwin/xcbutils.h
1 files changed in total