ecore_x_randr_output_name_get fixme removed
authorMike Blumenkrantz <zmike@samsung.com>
Tue, 21 Jan 2014 03:00:47 +0000 (22:00 -0500)
committerMike Blumenkrantz <zmike@samsung.com>
Tue, 21 Jan 2014 03:16:18 +0000 (22:16 -0500)
this was a fixme which was likely written sometime before July 2010 when the bug was fixed, just prior to the 1.3.1 release. I think it's probably okay to require that release since it's been 3+ years.

configure.ac
src/lib/ecore_x/xlib/ecore_x_randr.c

index 9d12cc8..2d2e377 100644 (file)
@@ -2875,6 +2875,10 @@ if test "x${want_x11_xlib}" = "xyes" ; then
    ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent])
    ECORE_CHECK_X_EXTENSION([Xss], [scrnsaver.h], [Xss], [XScreenSaverSelectInput])
 
+   if test echo "$ECORE_X_LIBS" | grep -q Xrandr ; then
+      PKG_CHECK_EXISTS([xrandr > 1.3.1], [], [AC_MSG_ERROR([Xrandr >= 1.3.1 required])])
+   fi
+
    if test "${want_xpresent}" = "yes"; then
       ECORE_CHECK_X_EXTENSION([Xpresent], [Xpresent.h], [Xpresent], [XPresentQueryExtension])
    fi
index c33760b..a88fcff 100644 (file)
@@ -2206,13 +2206,8 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
           {
              if (info->name)
                {
-                  /* FIXME: TODO: NB:
-                   * 
-                   * Old randr code says there is an xrandr bug here with 
-                   * nameLen. Test This !!!
-                   * 
-                   */
-                  ret = strdup(info->name);
+                  ret = malloc(info->nameLen);
+                  memcpy(ret, info->name, info->nameLen);
                   if (len) *len = info->nameLen;
                }