From 100ed0c01d7678a97e3b7b3a46320d84b3a7096d Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Wed, 24 Sep 2014 18:14:22 +0400 Subject: xcb: Fix getting the primary screen from QXcbConnection::screens() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jørgen Lind --- src/plugins/platforms/xcb/qxcbdrag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb/qxcbdrag.cpp') diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index 53437f24ae..7037e102e2 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -311,7 +311,7 @@ void QXcbDrag::move(const QMouseEvent *me) return; const QList &screens = connection()->screens(); - QXcbScreen *screen = screens.at(connection()->primaryScreen()); + QXcbScreen *screen = connection()->primaryScreen(); for (int i = 0; i < screens.size(); ++i) { if (screens.at(i)->geometry().contains(globalPos)) { screen = screens.at(i); -- cgit v1.2.3