summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2014-09-24 18:14:22 +0400
committerAlexander Volkov <a.volkov@rusbitech.ru>2014-10-29 10:03:55 +0100
commit100ed0c01d7678a97e3b7b3a46320d84b3a7096d (patch)
tree6f48ed8cbc70e418cc9c709c7ad76aee228267a0 /src/plugins/platforms/xcb/qxcbconnection.h
parent6c38a82aa8165bbe3cbdc7f17e67999439842c29 (diff)
xcb: Fix getting the primary screen from QXcbConnection::screens()
Currently getting QXcbScreen* for primary screen is too messy and it wrongly uses QXcbConnection::primaryScreen() as an index in QXcbConnection::screens() although QXcbConnection::screens() returns the primary screen as the first item in the list since 3c8eb404877df9c967d81fa9df7d718c538fb407. So to clear the API rename primaryScreen() to primaryScreenNumber(), add QXcbConnection::primaryScreen() that returns correct QXcbScreen* and use it directly. Change-Id: Icb7391aa3e82b32ca48f2bda764dcf7ffd89cc47 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 4a16e116c6..51c7c91bf6 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -369,7 +369,8 @@ public:
QXcbConnection *connection() const { return const_cast<QXcbConnection *>(this); }
const QList<QXcbScreen *> &screens() const { return m_screens; }
- int primaryScreen() const { return m_primaryScreen; }
+ int primaryScreenNumber() const { return m_primaryScreenNumber; }
+ QXcbScreen *primaryScreen() const;
inline xcb_atom_t atom(QXcbAtom::Atom atom) const { return m_allAtoms[atom]; }
QXcbAtom::Atom qatom(xcb_atom_t atom) const;
@@ -550,7 +551,7 @@ private:
bool m_canGrabServer;
QList<QXcbScreen *> m_screens;
- int m_primaryScreen;
+ int m_primaryScreenNumber;
xcb_atom_t m_allAtoms[QXcbAtom::NAtoms];