diff options
author | Uli Schlachter <psychon@znc.in> | 2013-06-01 16:57:19 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-22 08:12:59 +0200 |
commit | 3ff441d30570fd38f62d858b8c8e86e9d1ca3d8d (patch) | |
tree | 3031ef187319c38dbe5799d4934409560ee93f2e /src | |
parent | a0996b8b606d9d54fe4ba3a02615a26b196f0547 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index 7d832a1c08..9e9fd2914f 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -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) |