diff mbox

[02/15] qtbase: Fix xcb platform error (xrandr patch)

Message ID fb6970bf15996c63f1bd5c52463b7680e096d989.1404891982.git.Svend.Vedstesen@prevas.dk
State Accepted
Delegated to: Christian Sørensen
Headers show

Commit Message

Svend Aage Vedstesen July 9, 2014, 8:08 a.m. UTC
From: Christian Sørensen <christian.braunersorensen@prevas.dk>

---
 .../qt-everywhere-opensource-5.1.1-randr.patch     | 32 ++++++++++++++++++++++
 recipes/qt5/qtbase_5.1.1.oe                        |  2 ++
 2 files changed, 34 insertions(+)
 create mode 100644 recipes/qt5/qtbase-5.1.1/qt-everywhere-opensource-5.1.1-randr.patch
diff mbox

Patch

diff --git a/recipes/qt5/qtbase-5.1.1/qt-everywhere-opensource-5.1.1-randr.patch b/recipes/qt5/qtbase-5.1.1/qt-everywhere-opensource-5.1.1-randr.patch
new file mode 100644
index 0000000..e97a56c
--- /dev/null
+++ b/recipes/qt5/qtbase-5.1.1/qt-everywhere-opensource-5.1.1-randr.patch
@@ -0,0 +1,32 @@ 
+--- qtbase-opensource-src-5.1.1/src/plugins/platforms/xcb/qxcbconnection.cpp.orig	2014-02-11 14:32:53.679463750 +0100
++++ qtbase-opensource-src-5.1.1/src/plugins/platforms/xcb/qxcbconnection.cpp	2014-02-11 14:34:18.391462522 +0100
+@@ -142,23 +142,23 @@
+             xcb_generic_error_t *error = NULL;
+             xcb_randr_get_output_primary_cookie_t primaryCookie =
+                 xcb_randr_get_output_primary(xcb_connection(), xcbScreen->root);
+-            xcb_randr_get_screen_resources_current_cookie_t resourcesCookie =
+-                xcb_randr_get_screen_resources_current(xcb_connection(), xcbScreen->root);
++            xcb_randr_get_screen_resources_cookie_t resourcesCookie =
++                xcb_randr_get_screen_resources(xcb_connection(), xcbScreen->root);
+             xcb_randr_get_output_primary_reply_t *primary =
+                     xcb_randr_get_output_primary_reply(xcb_connection(), primaryCookie, &error);
+             if (!primary || error) {
+                 qWarning("QXcbConnection: Failed to get the primary output of the screen");
+                 free(error);
+             } else {
+-                xcb_randr_get_screen_resources_current_reply_t *resources =
+-                        xcb_randr_get_screen_resources_current_reply(xcb_connection(), resourcesCookie, &error);
++                xcb_randr_get_screen_resources_reply_t *resources =
++                        xcb_randr_get_screen_resources_reply(xcb_connection(), resourcesCookie, &error);
+                 if (!resources || error) {
+                     qWarning("QXcbConnection: Failed to get the screen resources");
+                     free(error);
+                 } else {
+                     xcb_timestamp_t timestamp = resources->config_timestamp;
+-                    outputCount = xcb_randr_get_screen_resources_current_outputs_length(resources);
+-                    xcb_randr_output_t *outputs = xcb_randr_get_screen_resources_current_outputs(resources);
++                    outputCount = xcb_randr_get_screen_resources_outputs_length(resources);
++                    xcb_randr_output_t *outputs = xcb_randr_get_screen_resources_outputs(resources);
+ 
+                     for (int i = 0; i < outputCount; i++) {
+                         xcb_randr_get_output_info_reply_t *output =
diff --git a/recipes/qt5/qtbase_5.1.1.oe b/recipes/qt5/qtbase_5.1.1.oe
index 0f5acf7..26c1cfc 100644
--- a/recipes/qt5/qtbase_5.1.1.oe
+++ b/recipes/qt5/qtbase_5.1.1.oe
@@ -2,3 +2,5 @@  require qt5-${PV}.inc
 require ${PN}.inc
 
 SRC_URI += "file://qeglfshooks_imx5.cpp"
+
+SRC_URI += "file://qt-everywhere-opensource-5.1.1-randr.patch"