diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-07-04 10:19:00 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-05 10:21:33 +0200 |
commit | ce2fe90faad84a6e3a976a6f111a0fa4883937d9 (patch) | |
tree | 13ba08d78e238e73c50d88c5c6756c0aace3991d /src/plugins/platforms/xcb/qxcbconnection.cpp | |
parent | 785bc64f8e743ac269f15cbe7fecba93d3d507ac (diff) |
xcb XI2: simplify and generalize tablet detection
We're looking for any tablet which has appropriate valuators, not
just Wacom tablets that have recognizable names. The name recognition
was always brittle and already stopped working, probably because of
changed udev rules or something like that.
Change-Id: Ib3a6dfdd9972b16f08f270e3f0a1aa54d6660c9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 209c7bb187..ca7896995f 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1400,11 +1400,16 @@ static const char * xcb_atomnames = { "_XSETTINGS_SETTINGS" }; -xcb_atom_t QXcbConnection::atom(QXcbAtom::Atom atom) +xcb_atom_t QXcbConnection::atom(QXcbAtom::Atom atom) const { return m_allAtoms[atom]; } +QXcbAtom::Atom QXcbConnection::qatom(xcb_atom_t xatom) const +{ + return static_cast<QXcbAtom::Atom>(qFind(m_allAtoms, m_allAtoms + QXcbAtom::NAtoms, xatom) - m_allAtoms); +} + void QXcbConnection::initializeAllAtoms() { const char *names[QXcbAtom::NAtoms]; const char *ptr = xcb_atomnames; |