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/qxcbconnection.cpp | |
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/qxcbconnection.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index e4eaeef5d8..901764bbf8 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1121,8 +1121,17 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) handled = false; break; case XCB_PROPERTY_NOTIFY: - HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent); + { + xcb_property_notify_event_t *pn = (xcb_property_notify_event_t *)event; + if (pn->atom == atom(QXcbAtom::_NET_WORKAREA)) { + QXcbVirtualDesktop *virtualDesktop = virtualDesktopForRootWindow(pn->window); + if (virtualDesktop) + virtualDesktop->updateWorkArea(); + } else { + HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent); + } break; + } #if defined(XCB_USE_XINPUT2) case XCB_GE_GENERIC: // Here the windowEventListener is invoked from xi2HandleEvent() |