backports for lazyhorns
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 7 Sep 2012 13:27:24 +0000 (13:27 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 7 Sep 2012 13:27:24 +0000 (13:27 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/branches/ecore-1.7@76309 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
NEWS
src/lib/ecore_x/xlib/ecore_x_randr_12.c

index a5581cd..936da47 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * Fix race condition in ecore-con where events could sometimes be sent for freed clients
        * Fix ssl servers using openssl
        * Fix ssl connections overall
+
+2012-09-07  Christopher Michael
+
+       * Fix ecore_x_randr to actually return outputs properly.
diff --git a/NEWS b/NEWS
index e208cd3..a78b358 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Additions:
      - Add Ecore_X_Error_Code enumeration
      - ECORE_X_RANDR_OUTPUT_POLICY_ASK
      - Add API functions to get/set an Ecore_X window's profile
+     - Fix ecore_x_randr functions to work properly.
     * ecore_con:
      - ECORE_{CON,IPC}_NO_PROXY now available for disabling proxying on certain connections
      - New dns.c resolver backend for faster dns lookups
index a1fecf8..417efb3 100644 (file)
@@ -642,10 +642,12 @@ ecore_x_randr_outputs_get(Ecore_X_Window root,
      {
         if ((ret = malloc(sizeof(Ecore_X_Randr_Output) * res->noutput)))
           {
-             memcpy(ret, res->outputs,
-                    (sizeof(Ecore_X_Randr_Output) * res->noutput));
-             if (num)
-               *num = res->noutput;
+             int i = 0;
+
+             if (num) *num = res->noutput;
+
+             for (i = 0; i < res->noutput; i++)
+               ret[i] = res->outputs[i];
           }
 
         if (res)