xcb: Add xlib wrapper for XFlush()
Also avoid to include xlib headers directly. Change-Id: Id60a9b39a9d8284d5d0ab3df1ed61f844f1e68e4 Reviewed-by: JiDe Zhang <zhangjide@uniontech.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit be4d339ce784921e0d1b127a86e025a1274e25b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5faba47f95
commit
5bd9843b10
@ -83,6 +83,8 @@ qt_internal_extend_target(XcbQpaPrivate CONDITION QT_FEATURE_draganddrop
|
||||
)
|
||||
|
||||
qt_internal_extend_target(XcbQpaPrivate CONDITION QT_FEATURE_xcb_xlib
|
||||
SOURCES
|
||||
qt_xlib_wrapper.c qt_xlib_wrapper.h
|
||||
PUBLIC_LIBRARIES
|
||||
X11::XCB
|
||||
# special case begin
|
||||
|
7
src/plugins/platforms/xcb/qt_xlib_wrapper.c
Normal file
7
src/plugins/platforms/xcb/qt_xlib_wrapper.c
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
#include "qt_xlib_wrapper.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
void qt_XFlush(Display *dpy) { XFlush(dpy); }
|
17
src/plugins/platforms/xcb/qt_xlib_wrapper.h
Normal file
17
src/plugins/platforms/xcb/qt_xlib_wrapper.h
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
#ifndef QT_XLIB_WRAPPER_H
|
||||
#define QT_XLIB_WRAPPER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _XDisplay Display;
|
||||
void qt_XFlush(Display *dpy);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // QT_XLIB_WRAPPER_H
|
Loading…
x
Reference in New Issue
Block a user