From ee19e15ef7d4c7caeeec56b0a75ddf90c4650119 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Thu, 25 Aug 2016 15:29:24 +0300 Subject: xcb: Move handling of RRScreenChangeNotify from QXcbScreen to QXcbVirtualDesktop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Gatis Paeglis --- src/plugins/platforms/xcb/qxcbconnection.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp') diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 5fd1fc6a47..f7b8fa1a78 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1207,10 +1207,9 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) handled = true; } else if (has_randr_extension && response_type == xrandr_first_event + XCB_RANDR_SCREEN_CHANGE_NOTIFY) { xcb_randr_screen_change_notify_event_t *change_event = reinterpret_cast(event); - for (QXcbScreen *s : qAsConst(m_screens)) { - if (s->root() == change_event->root ) - s->handleScreenChange(change_event); - } + if (auto *virtualDesktop = virtualDesktopForRootWindow(change_event->root)) + virtualDesktop->handleScreenChange(change_event); + handled = true; #if QT_CONFIG(xkb) } else if (response_type == xkb_first_event) { // https://bugs.freedesktop.org/show_bug.cgi?id=51295 -- cgit v1.2.3 From 89f7e090efe1c5f0df627f83492174a0f4e47e32 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 4 Jul 2018 23:17:16 -0700 Subject: XCB/Xlib: make sure we don't get problems for sys headers using register Found while compiling on FreeBSD 11.2 (clang 6 update has the warning): /usr/local/include/X11/Xlibint.h:675:7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] Change-Id: I117816bf0f5e469b8d34fffd153e6482ccaed69f Reviewed-by: Gatis Paeglis --- src/plugins/platforms/xcb/qxcbconnection.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp') diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index f7b8fa1a78..20414d0525 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -73,10 +73,12 @@ #include #if QT_CONFIG(xcb_xlib) +#define register /* C++17 deprecated register */ #include #include #include #include +#undef register #endif #if QT_CONFIG(xinput2) -- cgit v1.2.3