We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1390

Summary: X11_KeyToUnicode function still there?
Product: SDL Reporter: manuel.montezelo
Component: *don't know*Assignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.15   
Hardware: Other   
OS: Linux   
Attachments: x11_keytounicode.diff

Description manuel.montezelo 2012-01-22 08:56:18 UTC
Created attachment 793 [details]
x11_keytounicode.diff

Hello,

We had the following bug report at Debian:
http://bugs.debian.org/376560

Same one in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/libsdl1.2/+bug/66217

We've been including a patch since then (attached) to actually export the symbol, since 2006.  In the last release the function seems to be there, alive and kicking.

It's affecting other people too:
http://www.garagegames.com/community/forums/viewthread/52287

So maybe the issue should be fixed in some way or another?  Having to export the symbol ourselves, modifying upstream API doesn't seem clean to me.  On the other hand we don't want to disable to disable the patch and get a flow of complaints, just to have it enabled again.

Can you think of a clear solution?


  1239 /*
  1240  * This function is semi-official; it is not officially exported and should
  1241  * not be considered part of the SDL API, but may be used by client code
  1242  * that *really* needs it (including legacy code).
  1243  * It is slow, though, and should be avoided if possible.
  1244  *
  1245  * Note that it isn't completely accurate either; in particular, multi-key
  1246  * sequences (dead accents, compose key sequences) will not work since the
  1247  * state has been irrevocably lost.
  1248  */
  1249 Uint16 X11_KeyToUnicode(SDLKey keysym, SDLMod modifiers)
Comment 1 Sam Lantinga 2012-01-22 10:48:43 UTC
At this point it's fine to leave it as an exported function, but not in the headers.
http://hg.libsdl.org/SDL/rev/900a0fae90ca

Thanks!