Lines 608-624
Link Here
|
608 |
{ |
608 |
{ |
609 |
XkbDescPtr pXkbDesc = NULL; |
609 |
XkbDescPtr pXkbDesc = NULL; |
610 |
// try X keyboard extension |
610 |
// try X keyboard extension |
|
|
611 |
#ifdef MACOSX |
612 |
// FIXME |
613 |
// XDarwin doesn't yet have very good support for the Xkeyboard extension. |
614 |
// When we call XkbGetKeyboard(), the XServer throws a message up in the |
615 |
// console about xkbcomp and files for geometry include. The side effect of |
616 |
// this is _very_ noticable lag when drawing menus. The file menu, for example, |
617 |
// takes about 1s to come down on my G4/450 DP and you can see it draw. Therefore |
618 |
// we are disabling it for the moment until better XDarwin support exists. |
619 |
// It is so ordered. |
620 |
if ( 0 ) |
621 |
#else |
611 |
if( pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd ) ) |
622 |
if( pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd ) ) |
|
|
623 |
#endif |
612 |
{ |
624 |
{ |
613 |
const char* pAtom = NULL; |
625 |
const char* pAtom = NULL; |
614 |
if( pXkbDesc->names->groups[0] ) |
626 |
if( pXkbDesc->names->groups[0] ) |
615 |
{ |
627 |
{ |
616 |
pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->groups[0] ); |
628 |
pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->groups[0] ); |
617 |
m_aKeyboardName = pAtom; |
629 |
m_aKeyboardName = pAtom; |
618 |
XFree( (void*)pAtom ); |
630 |
XFree( (void*)pAtom ); |
619 |
} |
631 |
} |
620 |
else |
632 |
else |
621 |
m_aKeyboardName = "<unknown keyboard>"; |
633 |
m_aKeyboardName = "<unknown keyboard>"; |
622 |
#ifdef DEBUG |
634 |
#ifdef DEBUG |
623 |
#define PRINT_ATOM( x ) { if( pXkbDesc->names->x ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x ); fprintf( stderr, "%s: %s\n", #x, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s: <nil>\n", #x ); } |
635 |
#define PRINT_ATOM( x ) { if( pXkbDesc->names->x ) { pAtom = XGetAtomName( GetDisplay(), pXkbDesc->names->x ); fprintf( stderr, "%s: %s\n", #x, pAtom ); XFree( (void*)pAtom ); } else fprintf( stderr, "%s: <nil>\n", #x ); } |
624 |
|
636 |
|