The locale parameter was a mistake, because it puts extra needless
burden upon the module developer to have to handle this variable for
each and every single callback function. The parameter is being removed
in favor of a single centralized module callback function that
specifically updates locale information for a module only when needed.
Having the value stored here is somewhat pointless, so this is one step
in fixing the locale handling. Locale should be handled by the modules
themselves with their own loaded locale lookup information.
This patch adds support for multi-screen setups by using xinerama
information if available to determine the screen size and position.
In case xinerama is not available or not active it uses the information
provided for the x screen.
To clean up the code some generic helper functions were moved to a
separate source file.