summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2020-08-25 11:19:13 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-09-04 17:28:49 +0000
commitc91d1fdc100cda88b94217153def52ab7fe63d21 (patch)
treefe14d83da1c305946aaefaaffbd8425f16175bcd /src/plugins/platforms/xcb
parentd85bc34b7906a91c1afc3d7adc5feace53057d6a (diff)
xcb: drop Xinerama support
[ChangeLog][Important Behavior Changes][X11] Xinerama is no longer supported. Fixes: QTBUG-86082 Change-Id: Ieb57d9035e1659fc22bf8333247fc3573fb62992 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt1
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_basic.cpp14
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_basic.h3
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_screens.cpp17
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp10
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h4
-rw-r--r--src/plugins/platforms/xcb/xcb_qpa_lib.pro2
7 files changed, 3 insertions, 48 deletions
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt
index 22a955fec6..9b04785dcb 100644
--- a/src/plugins/platforms/xcb/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/CMakeLists.txt
@@ -53,7 +53,6 @@ qt_add_module(XcbQpa
XCB::SYNC
XCB::XCB
XCB::XFIXES
- XCB::XINERAMA
XCB::XKB
XKB::XKB
)
diff --git a/src/plugins/platforms/xcb/qxcbconnection_basic.cpp b/src/plugins/platforms/xcb/qxcbconnection_basic.cpp
index 18dee89adb..020412fc87 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_basic.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_basic.cpp
@@ -43,7 +43,6 @@
#include <xcb/shm.h>
#include <xcb/sync.h>
#include <xcb/xfixes.h>
-#include <xcb/xinerama.h>
#include <xcb/render.h>
#include <xcb/xinput.h>
#define explicit dont_use_cxx_explicit
@@ -145,8 +144,6 @@ QXcbBasicConnection::QXcbBasicConnection(const char *displayName)
initializeShm();
if (!qEnvironmentVariableIsSet("QT_XCB_NO_XRANDR"))
initializeXRandr();
- if (!m_hasXRandr)
- initializeXinerama();
initializeXFixes();
initializeXRender();
if (!qEnvironmentVariableIsSet("QT_XCB_NO_XI2"))
@@ -307,17 +304,6 @@ void QXcbBasicConnection::initializeXRender()
m_xrenderVersion.second = xrenderQuery->minor_version;
}
-void QXcbBasicConnection::initializeXinerama()
-{
- const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_xcbConnection, &xcb_xinerama_id);
- if (!reply || !reply->present)
- return;
-
- auto xineramaActive = Q_XCB_REPLY(xcb_xinerama_is_active, m_xcbConnection);
- if (xineramaActive && xineramaActive->state)
- m_hasXinerama = true;
-}
-
void QXcbBasicConnection::initializeXFixes()
{
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_xcbConnection, &xcb_xfixes_id);
diff --git a/src/plugins/platforms/xcb/qxcbconnection_basic.h b/src/plugins/platforms/xcb/qxcbconnection_basic.h
index 109186f966..bda02ce9c2 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_basic.h
+++ b/src/plugins/platforms/xcb/qxcbconnection_basic.h
@@ -96,7 +96,6 @@ public:
bool hasShm() const { return m_hasShm; }
bool hasShmFd() const { return m_hasShmFd; }
bool hasXSync() const { return m_hasXSync; }
- bool hasXinerama() const { return m_hasXinerama; }
bool hasBigRequest() const;
bool isAtLeastXI21() const { return m_xi2Enabled && m_xi2Minor >= 1; }
@@ -113,7 +112,6 @@ protected:
void initializeXFixes();
void initializeXRender();
void initializeXRandr();
- void initializeXinerama();
void initializeXShape();
void initializeXKB();
void initializeXSync();
@@ -130,7 +128,6 @@ private:
QXcbAtom m_xcbAtom;
bool m_hasXFixes = false;
- bool m_hasXinerama = false;
bool m_hasXhape = false;
bool m_hasInputShape;
bool m_hasXRandr = false;
diff --git a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
index 9ba71ada37..82b0f65774 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
@@ -46,8 +46,6 @@
#include <qpa/qwindowsysteminterface.h>
-#include <xcb/xinerama.h>
-
void QXcbConnection::xrandrSelectEvents()
{
xcb_screen_iterator_t rootIter = xcb_setup_roots_iterator(setup());
@@ -358,21 +356,6 @@ void QXcbConnection::initializeScreens()
}
}
}
- } else if (hasXinerama()) {
- // Xinerama is available
- auto screens = Q_XCB_REPLY(xcb_xinerama_query_screens, xcb_connection());
- if (screens) {
- xcb_xinerama_screen_info_iterator_t it = xcb_xinerama_query_screens_screen_info_iterator(screens.get());
- while (it.rem) {
- xcb_xinerama_screen_info_t *screen_info = it.data;
- QXcbScreen *screen = new QXcbScreen(this, virtualDesktop,
- XCB_NONE, nullptr,
- screen_info, it.index);
- siblings << screen;
- m_screens << screen;
- xcb_xinerama_screen_info_next(&it);
- }
- }
}
if (siblings.isEmpty()) {
// If there are no XRandR outputs or XRandR extension is missing,
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 6ce8a91f36..c17be437ce 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -494,8 +494,7 @@ quint8 QXcbVirtualDesktop::depthOfVisual(xcb_visualid_t visualid) const
}
QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop,
- xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *output,
- const xcb_xinerama_screen_info_t *xineramaScreenInfo, int xineramaScreenIdx)
+ xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *output)
: QXcbObject(connection)
, m_virtualDesktop(virtualDesktop)
, m_output(outputId)
@@ -511,13 +510,6 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDe
updateGeometry(QRect(crtc->x, crtc->y, crtc->width, crtc->height), crtc->rotation);
updateRefreshRate(crtc->mode);
}
- } else if (xineramaScreenInfo) {
- m_geometry = QRect(xineramaScreenInfo->x_org, xineramaScreenInfo->y_org,
- xineramaScreenInfo->width, xineramaScreenInfo->height);
- m_availableGeometry = m_geometry & m_virtualDesktop->workArea();
- m_sizeMillimeters = sizeInMillimeters(m_geometry.size(), m_virtualDesktop->dpi());
- if (xineramaScreenIdx > -1)
- m_outputName += QLatin1Char('-') + QString::number(xineramaScreenIdx);
}
if (m_geometry.isEmpty())
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 60ef82bae3..9298a67b2b 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -47,7 +47,6 @@
#include <xcb/xcb.h>
#include <xcb/randr.h>
#include <xcb/xfixes.h>
-#include <xcb/xinerama.h>
#include "qxcbobject.h"
@@ -142,8 +141,7 @@ class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen
{
public:
QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop,
- xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *outputInfo,
- const xcb_xinerama_screen_info_t *xineramaScreenInfo = nullptr, int xineramaScreenIdx = -1);
+ xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *outputInfo);
~QXcbScreen();
QString getOutputName(xcb_randr_get_output_info_reply_t *outputInfo);
diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
index f44388cc6d..bb57e16ab5 100644
--- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -85,7 +85,7 @@ qtConfig(vulkan) {
QMAKE_USE += \
xcb xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil \
- xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xkbcommon xkbcommon_x11
+ xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xkb xkbcommon xkbcommon_x11
qtConfig(system-xcb-xinput) {
QMAKE_USE += xcb_xinput