Add mapping notification support for X11

This commit is contained in:
Lukas Dürrenberger 2022-06-23 19:59:24 +02:00
parent aba54925d8
commit 89ea3af65e
2 changed files with 10 additions and 1 deletions

View File

@ -782,7 +782,7 @@ String KeyboardImpl::getDescription(Keyboard::Scancode code)
case Keyboard::Scan::LaunchMail: return "Launch Mail";
case Keyboard::Scan::LaunchMediaSelect: return "Launch Media Select";
default: return "Unknown Scancode";
default: return "Unknown Scancode";
}
}

View File

@ -2005,6 +2005,15 @@ bool WindowImplX11::processEvent(XEvent& windowEvent)
break;
}
// Keyboard mapping changed
case MappingNotify:
{
if (windowEvent.xmapping.request == MappingKeyboard)
XRefreshKeyboardMapping(&windowEvent.xmapping);
break;
}
// Window unmapped
case UnmapNotify:
{