1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:17:34 +00:00

WindowServer+Keymap+LibGUI: Add widget to display current keymap

This commit is contained in:
Timur Sultanov 2022-01-19 14:44:56 +03:00 committed by Andreas Kling
parent 68a01f0e27
commit b9c558f6c6
14 changed files with 160 additions and 17 deletions

View file

@ -67,6 +67,7 @@ public:
WM_SuperKeyPressed,
WM_SuperSpaceKeyPressed,
WM_WorkspaceChanged,
WM_KeymapChanged,
__End_WM_Events,
};
@ -228,6 +229,20 @@ private:
const unsigned m_current_column;
};
class WMKeymapChangedEvent : public WMEvent {
public:
explicit WMKeymapChangedEvent(int client_id, String const& keymap)
: WMEvent(Event::Type::WM_KeymapChanged, client_id, 0)
, m_keymap(keymap)
{
}
String const& keymap() const { return m_keymap; }
private:
const String m_keymap;
};
class MultiPaintEvent final : public Event {
public:
explicit MultiPaintEvent(Vector<Gfx::IntRect, 32> rects, Gfx::IntSize const& window_size)