xcb: Don't use Xlib's XBell() function

XBell() just sends a Bell request to the X11 server. This can be done
equally well (and with less ifdefs) through xcb's xcb_bell().

Change-Id: If41d955aa97acfe9e0a8b9fce05c11ebc146ce8e
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Uli Schlachter 2013-06-01 16:57:19 +02:00 committed by The Qt Project
parent a0996b8b60
commit 3ff441d305

View File

@ -95,12 +95,9 @@ QXcbNativeInterface::QXcbNativeInterface() :
void QXcbNativeInterface::beep() // For QApplication::beep()
{
#ifdef XCB_USE_XLIB
::Display *display = (::Display *)nativeResourceForScreen(QByteArrayLiteral("display"), QGuiApplication::primaryScreen());
XBell(display, 0);
#else
fputc(7, stdout);
#endif
QPlatformScreen *screen = QGuiApplication::primaryScreen()->handle();
xcb_connection_t *connection = static_cast<QXcbScreen *>(screen)->xcb_connection();
xcb_bell(connection, 0);
}
void *QXcbNativeInterface::nativeResourceForIntegration(const QByteArray &resourceString)