summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection_screens.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_screens.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
index 9ba71ada37..ec099101f5 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
@@ -290,6 +290,8 @@ void QXcbConnection::initializeScreens()
// RRGetScreenResources in this case.
auto resources_current = Q_XCB_REPLY(xcb_randr_get_screen_resources_current,
xcb_connection(), xcbScreen->root);
+ decltype(Q_XCB_REPLY(xcb_randr_get_screen_resources,
+ xcb_connection(), xcbScreen->root)) resources;
if (!resources_current) {
qWarning("failed to get the current screen resources");
} else {
@@ -300,8 +302,8 @@ void QXcbConnection::initializeScreens()
timestamp = resources_current->config_timestamp;
outputs = xcb_randr_get_screen_resources_current_outputs(resources_current.get());
} else {
- auto resources = Q_XCB_REPLY(xcb_randr_get_screen_resources,
- xcb_connection(), xcbScreen->root);
+ resources = Q_XCB_REPLY(xcb_randr_get_screen_resources,
+ xcb_connection(), xcbScreen->root);
if (!resources) {
qWarning("failed to get the screen resources");
} else {