diff --git a/kstyle/breezehelper.h b/kstyle/breezehelper.h --- a/kstyle/breezehelper.h +++ b/kstyle/breezehelper.h @@ -32,7 +32,6 @@ #include #if BREEZE_HAVE_X11 -#include #include #endif @@ -294,9 +293,6 @@ #if BREEZE_HAVE_X11 - //* get xcb connection - static xcb_connection_t* connection(); - //* create xcb atom xcb_atom_t createAtom( const QString& ) const; diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -28,6 +28,10 @@ #include #include +#if BREEZE_HAVE_X11 +#include +#endif + #include namespace Breeze @@ -1575,8 +1579,8 @@ if( isX11() ) { // direct call to X - xcb_get_selection_owner_cookie_t cookie( xcb_get_selection_owner( connection(), _compositingManagerAtom ) ); - ScopedPointer reply( xcb_get_selection_owner_reply( connection(), cookie, nullptr ) ); + xcb_get_selection_owner_cookie_t cookie( xcb_get_selection_owner( QX11Info::connection(), _compositingManagerAtom ) ); + ScopedPointer reply( xcb_get_selection_owner_reply( QX11Info::connection(), cookie, nullptr ) ); return reply && reply->owner; } @@ -1608,20 +1612,13 @@ #if BREEZE_HAVE_X11 - //____________________________________________________________________ - xcb_connection_t* Helper::connection() - { - - return QX11Info::connection(); - } - //____________________________________________________________________ xcb_atom_t Helper::createAtom( const QString& name ) const { if( isX11() ) { - xcb_connection_t* connection( Helper::connection() ); + xcb_connection_t* connection( QX11Info::connection() ); xcb_intern_atom_cookie_t cookie( xcb_intern_atom( connection, false, name.size(), qPrintable( name ) ) ); ScopedPointer reply( xcb_intern_atom_reply( connection, cookie, nullptr) ); return reply ? reply->atom:0; diff --git a/kstyle/breezewindowmanager.cpp b/kstyle/breezewindowmanager.cpp --- a/kstyle/breezewindowmanager.cpp +++ b/kstyle/breezewindowmanager.cpp @@ -846,7 +846,7 @@ { #if BREEZE_HAVE_X11 // connection - auto connection( Helper::connection() ); + auto connection( QX11Info::connection() ); auto net_connection = connection; const qreal dpiRatio = window->devicePixelRatio();