diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-08-19 19:13:07 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-11-17 18:08:31 +0000 |
commit | 2047fe9253775347cced87bca5a6b9adf364c0bb (patch) | |
tree | aaec1401464d7c1d6a24ae2e8b3d3149a97318f1 /src/plugins/platforms/xcb/qxcbscreen.h | |
parent | 8beec998999b0ad7abf3192069c649b64aa999f5 (diff) |
xcb: Process _NET_WORKAREA and screen geometry changes separately
This commit allows to avoid superfluous calls to the X server.
We don't request _NET_WORKAREA values when the screen geometry changes,
and we avoid RandR calls on each _NET_WORKAREA change.
Besides, update the available geometry of all screens with the
same root window, rather than only that one which corresponds
to Qt::Desktop window.
Change-Id: I5ec624717f5f261c986cd9aaf2425f22985e11c0
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbscreen.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index 7b5d3cb30f..c68c290791 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -77,10 +77,15 @@ public: bool compositingActive() const; + QRect workArea() const { return m_workArea; } + void updateWorkArea(); + void handleXFixesSelectionNotify(xcb_xfixes_selection_notify_event_t *notify_event); void subscribeToXFixesSelectionNotify(); private: + QRect getWorkArea() const; + xcb_screen_t *m_screen; int m_number; QList<QPlatformScreen *> m_screens; @@ -88,6 +93,8 @@ private: QXcbXSettings *m_xSettings; xcb_atom_t m_net_wm_cm_atom; bool m_compositingActive; + + QRect m_workArea; }; class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen @@ -142,6 +149,7 @@ public: void handleScreenChange(xcb_randr_screen_change_notify_event_t *change_event); void updateGeometry(const QRect &geom, uint8_t rotation); void updateGeometry(xcb_timestamp_t timestamp = XCB_TIME_CURRENT_TIME); + void updateAvailableGeometry(); void updateRefreshRate(xcb_randr_mode_t mode); void readXResources(); |