From: Mike Blumenkrantz Date: Tue, 21 Jan 2014 03:00:47 +0000 (-0500) Subject: ecore_x_randr_output_name_get fixme removed X-Git-Tag: v1.9.0-alpha1~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1feed7a1aec147ef8f3a0829437e749dde8c373f;p=platform%2Fupstream%2Fefl.git ecore_x_randr_output_name_get fixme removed 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. --- diff --git a/configure.ac b/configure.ac index 9d12cc8..2d2e377 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/lib/ecore_x/xlib/ecore_x_randr.c b/src/lib/ecore_x/xlib/ecore_x_randr.c index c33760b..a88fcff 100644 --- a/src/lib/ecore_x/xlib/ecore_x_randr.c +++ b/src/lib/ecore_x/xlib/ecore_x_randr.c @@ -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; }