Changeset 44765 in vbox for trunk/src/VBox/Frontends/Common/VBoxKeyboard/keyboard.c
- Timestamp:
- Feb 20, 2013 3:25:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/Common/VBoxKeyboard/keyboard.c
r36335 r44765 548 548 /** 549 549 * Checks for the XKB extension, and if it is found initialises the X11 keycode 550 * to XT scan code mapping by looking at the XKB names for each keycode. 550 * to XT scan code mapping by looking at the XKB names for each keycode. As it 551 * turns out that XKB can return an empty list we make sure that the list holds 552 * enough data to be useful to us. 551 553 */ 552 554 static unsigned … … 555 557 int major = XkbMajorVersion, minor = XkbMinorVersion; 556 558 XkbDescPtr pKBDesc; 559 unsigned cFound = 0; 560 557 561 if (!XkbLibraryVersion(&major, &minor)) 558 562 return 0; … … 575 579 { 576 580 keyc2scan[i] = xkbMap[j].uScan; 581 ++cFound; 577 582 break; 578 583 } … … 580 585 XkbFreeNames(pKBDesc, XkbKeyNamesMask, True); 581 586 XkbFreeKeyboard(pKBDesc, XkbAllComponentsMask, True); 582 return 1;587 return cFound >= 45 ? 1 : 0; 583 588 } 584 589
Note:
See TracChangeset
for help on using the changeset viewer.