xcb: minor cleanups around QT_CONFIG(xcb_xlib)
- Remove unused createVisualInfoForDefaultVisualId() function.
This amends dff3c0f14f.
- Inline QXcbConnection::xlib_display().
- Don't nest QT_CONFIG(xcb_native_painting) in QT_CONFIG(xcb_xlib).
configure.json already checks for the dependencies, we don't need
to do that again in *.h/*.cpp.
Change-Id: If39912e67ce9baa31faf091bebe120bac5cf6876
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
bb10
parent
ead3ca4aef
commit
b2035d38e8
|
|
@ -1610,29 +1610,6 @@ xcb_window_t QXcbConnection::clientLeader()
|
|||
return m_clientLeader;
|
||||
}
|
||||
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
void *QXcbConnection::xlib_display() const
|
||||
{
|
||||
return m_xlib_display;
|
||||
}
|
||||
|
||||
void *QXcbConnection::createVisualInfoForDefaultVisualId() const
|
||||
{
|
||||
if (m_defaultVisualId == UINT_MAX)
|
||||
return 0;
|
||||
XVisualInfo info;
|
||||
memset(&info, 0, sizeof info);
|
||||
info.visualid = m_defaultVisualId;
|
||||
|
||||
int count = 0;
|
||||
Display *dpy = static_cast<Display *>(connection()->xlib_display());
|
||||
XVisualInfo *retVisual = XGetVisualInfo(dpy, VisualIDMask, &info, &count);
|
||||
Q_ASSERT(count < 2);
|
||||
return retVisual;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(xcb_xinput)
|
||||
static inline bool isXIType(xcb_generic_event_t *event, int opCode, uint16_t type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -423,8 +423,7 @@ public:
|
|||
xcb_visualid_t defaultVisualId() const { return m_defaultVisualId; }
|
||||
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
void *xlib_display() const;
|
||||
void *createVisualInfoForDefaultVisualId() const;
|
||||
void *xlib_display() const { return m_xlib_display; }
|
||||
#endif
|
||||
void sync();
|
||||
|
||||
|
|
|
|||
|
|
@ -65,12 +65,12 @@
|
|||
|
||||
#if QT_CONFIG(xcb_xlib)
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
#if QT_CONFIG(xcb_native_painting)
|
||||
#include "qxcbnativepainting.h"
|
||||
#include "qpixmap_x11_p.h"
|
||||
#include "qbackingstore_x11_p.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <qpa/qplatforminputcontextfactory_p.h>
|
||||
#include <private/qgenericunixthemes_p.h>
|
||||
|
|
|
|||
Loading…
Reference in New Issue