summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-01-21 16:07:38 -0500
committerMike Blumenkrantz <zmike@samsung.com>2014-01-21 16:07:38 -0500
commit052fc85cd34aec41d50e5d8333bac6ee9ba9c7d6 (patch)
treefba82401a70aef46a9092db974c1ef3579ccc091 /src
parent8cbd7c16227f6f40625257a02a026be29a576e0b (diff)
okay, bring back xrandr < 1.4 compat for ecore_x_randr_output_name_get
apparently I read the commit order wrong and this fix went in for 1.4.0, not 1.3.2, which means anyone who has 1.3.2 has been having lots of fun crashes for the past 24 hours
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_randr.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_randr.c b/src/lib/ecore_x/xlib/ecore_x_randr.c
index b4777772a3..db1f10968c 100644
--- a/src/lib/ecore_x/xlib/ecore_x_randr.c
+++ b/src/lib/ecore_x/xlib/ecore_x_randr.c
@@ -2206,10 +2206,17 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
2206 { 2206 {
2207 if (info->name) 2207 if (info->name)
2208 { 2208 {
2209 ret = malloc(info->nameLen + 1); 2209 size_t s;
2210 memcpy(ret, info->name, info->nameLen); 2210#ifdef XRANDR_GOOD
2211 ret[info->nameLen] = 0; 2211 s = info->nameLen;
2212 if (len) *len = info->nameLen; 2212#else
2213 /* pre 1.4.0 does not fill in info->nameLen */
2214 s = strlen(info->name);
2215#endif
2216 ret = malloc(s + 1);
2217 memcpy(ret, info->name, s);
2218 ret[s] = 0;
2219 if (len) *len = s;
2213 } 2220 }
2214 2221
2215 /* free the output info */ 2222 /* free the output info */