diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-08-25 15:29:24 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2018-07-09 17:35:50 +0000 |
commit | ee19e15ef7d4c7caeeec56b0a75ddf90c4650119 (patch) | |
tree | 0d0819ab01fcd6764ec53e9abe9efddd597057b7 /src/plugins/platforms/xcb/qxcbscreen.h | |
parent | a71ce35626e7acddccc3b1c3aa0d703377ff901d (diff) |
xcb: Move handling of RRScreenChangeNotify from QXcbScreen to QXcbVirtualDesktop
This event relates to xcb_screen_t (virtual desktop), not to
RandR crtcs, so move its processing to QXcbVirtualDesktop.
Currently it triggers redundant calling of RRGetCrtcInfo
(from QXcbScreen::updateGeometry()). It's called anyway after
receiving RRCrtcChangeNotify, so just drop it.
There is also a mess between the rotation of Screen and
crtcs, obviously they should be processed separately.
Task-number: QTBUG-65598
Change-Id: I124752ccbde03adb15e9ba592dd8b2d8d7fc35f4
Reviewed-by: Daniel Vrátil <dvratil@kde.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbscreen.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index 4a9b1bd209..6438669e7a 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -74,6 +74,7 @@ public: int number() const { return m_number; } QSize size() const { return QSize(m_screen->width_in_pixels, m_screen->height_in_pixels); } QSize physicalSize() const { return QSize(m_screen->width_in_millimeters, m_screen->height_in_millimeters); } + QDpi dpi() const; xcb_window_t root() const { return m_screen->root; } QXcbScreen *screenAt(const QPoint &pos) const; @@ -93,6 +94,8 @@ public: void handleXFixesSelectionNotify(xcb_xfixes_selection_notify_event_t *notify_event); void subscribeToXFixesSelectionNotify(); + void handleScreenChange(xcb_randr_screen_change_notify_event_t *change_event); + int forcedDpi() const { return m_forcedDpi; } QFontEngine::HintStyle hintStyle() const { return m_hintStyle; } QFontEngine::SubpixelAntialiasingType subpixelType() const { return m_subpixelType; } @@ -133,6 +136,7 @@ private: bool m_syncRequestSupported = false; QMap<xcb_visualid_t, xcb_visualtype_t> m_visuals; QMap<xcb_visualid_t, quint8> m_visualDepths; + uint16_t m_rotation = XCB_RANDR_ROTATION_ROTATE_0; }; class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen @@ -158,9 +162,6 @@ public: int depth() const override { return screen()->root_depth; } QImage::Format format() const override; QSizeF physicalSize() const override { return m_sizeMillimeters; } - QSize virtualSize() const { return m_virtualSize; } - QSizeF physicalVirtualSize() const { return m_virtualSizeMillimeters; } - QDpi virtualDpi() const; QDpi logicalDpi() const override; qreal pixelDensity() const override; QPlatformCursor *cursor() const override; @@ -197,7 +198,6 @@ public: QString name() const override { return m_outputName; } - void handleScreenChange(xcb_randr_screen_change_notify_event_t *change_event); void updateGeometry(const QRect &geometry, uint8_t rotation); void updateGeometry(xcb_timestamp_t timestamp = XCB_TIME_CURRENT_TIME); void updateAvailableGeometry(); @@ -227,8 +227,6 @@ private: QSizeF m_sizeMillimeters; QRect m_geometry; QRect m_availableGeometry; - QSize m_virtualSize; - QSizeF m_virtualSizeMillimeters; Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation; QXcbCursor *m_cursor; int m_refreshRate = 60; |