xcb: Remove QXcbScreen::m_nativeGeometry
It is equal to m_geometry since c173a50719
(Remove QT_DEVICE_PIXEL_RATIO support from xcb).
Also remove the declaration for QXcbWindow::screenForNativeGeometry(),
which was forgotten to be removed in that commit.
Change-Id: I8ec425a3bc111ec579e2e25c4fda8a02f1c8d09c
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This commit is contained in:
parent
1bcfc3de75
commit
f830102918
@ -70,7 +70,7 @@ QXcbVirtualDesktop::~QXcbVirtualDesktop()
|
||||
QXcbScreen *QXcbVirtualDesktop::screenAt(const QPoint &pos) const
|
||||
{
|
||||
foreach (QXcbScreen *screen, connection()->screens()) {
|
||||
if (screen->virtualDesktop() == this && screen->nativeGeometry().contains(pos))
|
||||
if (screen->virtualDesktop() == this && screen->geometry().contains(pos))
|
||||
return screen;
|
||||
}
|
||||
return Q_NULLPTR;
|
||||
@ -198,17 +198,15 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDe
|
||||
} else if (xineramaScreenInfo) {
|
||||
m_geometry = QRect(xineramaScreenInfo->x_org, xineramaScreenInfo->y_org,
|
||||
xineramaScreenInfo->width, xineramaScreenInfo->height);
|
||||
m_nativeGeometry = m_geometry;
|
||||
m_availableGeometry = m_geometry & m_virtualDesktop->workArea();
|
||||
m_sizeMillimeters = sizeInMillimeters(m_geometry.size(), virtualDpi());
|
||||
if (xineramaScreenIdx > -1)
|
||||
m_outputName += QLatin1Char('-') + QString::number(xineramaScreenIdx);
|
||||
}
|
||||
|
||||
if (m_geometry.isEmpty()) {
|
||||
if (m_geometry.isEmpty())
|
||||
m_geometry = QRect(QPoint(), m_virtualSize);
|
||||
m_nativeGeometry = QRect(QPoint(), m_virtualSize);
|
||||
}
|
||||
|
||||
if (m_availableGeometry.isEmpty())
|
||||
m_availableGeometry = m_geometry;
|
||||
|
||||
@ -557,7 +555,6 @@ void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation)
|
||||
qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4);
|
||||
m_pixelDensity = qRound(dpi/96);
|
||||
m_geometry = QRect(xGeometry.topLeft(), xGeometry.size());
|
||||
m_nativeGeometry = QRect(xGeometry.topLeft(), xGeometry.size());
|
||||
m_availableGeometry = xGeometry & m_virtualDesktop->workArea();
|
||||
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
|
||||
}
|
||||
@ -828,9 +825,7 @@ QDebug operator<<(QDebug debug, const QXcbScreen *screen)
|
||||
debug << ", screenNumber=" << screen->screenNumber();
|
||||
debug << ", virtualSize=" << screen->virtualSize().width() << 'x' << screen->virtualSize().height() << " (";
|
||||
formatSizeF(debug, screen->virtualSize());
|
||||
debug << "), nativeGeometry=";
|
||||
formatRect(debug, screen->nativeGeometry());
|
||||
debug << ", orientation=" << screen->orientation();
|
||||
debug << "), orientation=" << screen->orientation();
|
||||
debug << ", depth=" << screen->depth();
|
||||
debug << ", refreshRate=" << screen->refreshRate();
|
||||
debug << ", root=" << hex << screen->root();
|
||||
|
@ -114,7 +114,6 @@ public:
|
||||
QWindow *topLevelAt(const QPoint &point) const Q_DECL_OVERRIDE;
|
||||
|
||||
QRect geometry() const Q_DECL_OVERRIDE { return m_geometry; }
|
||||
QRect nativeGeometry() const { return m_nativeGeometry; }
|
||||
QRect availableGeometry() const Q_DECL_OVERRIDE {return m_availableGeometry;}
|
||||
int depth() const Q_DECL_OVERRIDE { return screen()->root_depth; }
|
||||
QImage::Format format() const Q_DECL_OVERRIDE;
|
||||
@ -186,7 +185,6 @@ private:
|
||||
QSizeF m_outputSizeMillimeters;
|
||||
QSizeF m_sizeMillimeters;
|
||||
QRect m_geometry;
|
||||
QRect m_nativeGeometry;
|
||||
QRect m_availableGeometry;
|
||||
QSize m_virtualSize;
|
||||
QSizeF m_virtualSizeMillimeters;
|
||||
|
@ -167,7 +167,6 @@ public:
|
||||
|
||||
virtual void create();
|
||||
virtual void destroy();
|
||||
QXcbScreen *screenForNativeGeometry(const QRect &newGeometry) const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void updateSyncRequestCounter();
|
||||
|
Loading…
Reference in New Issue
Block a user