51669cb Fix crash in getting system keyboard layout

Authored and Committed by Martin Pitt 14 years ago
    Fix crash in getting system keyboard layout
    
    In get_system_default_layout(), use a static variable for
    xkl_engine_get_instance() result, and don't close the X Display.
    
    This fixes the crash that happens at the second call of
    get_system_default_layout(): xkl_engine_get_instance() returns a singleton
    which saves the passed X Display instance, so we must never close it.
    
    https://launchpad.net/bugs/505972
    
        
file modified
+12 -11