VirtualBox

Changeset 32875 in vbox


Ignore:
Timestamp:
Oct 1, 2010 4:54:27 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66353
Message:

FE/Common/VBoxKeyboard: try to use XKB to determine the keyboard layout as well, and by default - missing file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/X11/XKeyboard-new.cpp

    r29654 r32875  
    3030static unsigned gfByLayoutOK = 1;
    3131static unsigned gfByTypeOK = 1;
     32static unsigned gfByXkbOK = 1;
    3233
    3334/**
     
    188189bool initXKeyboard(Display *dpy, int (*remapScancodes)[2])
    189190{
    190     X11DRV_InitKeyboard(dpy, &gfByLayoutOK, &gfByTypeOK, remapScancodes);
     191    X11DRV_InitKeyboard(dpy, &gfByLayoutOK, &gfByTypeOK, &gfByXkbOK,
     192                        remapScancodes);
    191193    /* It will almost always work to some extent */
    192194    return true;
     
    198200void doXKeyboardLogging(Display *dpy)
    199201{
    200     if ((gfByLayoutOK != 1) && (1 == gfByTypeOK))
     202    if (((1 == gfByTypeOK) || (1 == gfByXkbOK)) && (gfByLayoutOK != 1))
    201203        dumpLayout(dpy);
    202     if ((1 == gfByLayoutOK) && (gfByTypeOK != 1))
     204    if (((1 == gfByLayoutOK) || (1 == gfByXkbOK)) && (gfByTypeOK != 1))
    203205        dumpType(dpy);
    204     if ((gfByLayoutOK != 1) && (gfByTypeOK != 1))
     206    if ((gfByLayoutOK != 1) && (gfByTypeOK != 1) && (gfByXkbOK != 1))
    205207    {
    206208        LogRel(("Failed to recognize the keyboard mapping or to guess it based on\n"
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette