mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
WindowServer+Keymap+LibGUI: Add widget to display current keymap
This commit is contained in:
parent
68a01f0e27
commit
b9c558f6c6
14 changed files with 160 additions and 17 deletions
|
@ -53,6 +53,18 @@ WindowManager::WindowManager(Gfx::PaletteImpl const& palette)
|
|||
|
||||
reload_config();
|
||||
|
||||
m_keymap_switcher->on_keymap_change = [&](String const& keymap) {
|
||||
for_each_window_manager([&keymap](WMClientConnection& conn) {
|
||||
if (!(conn.event_mask() & WMEventMask::KeymapChanged))
|
||||
return IterationDecision::Continue;
|
||||
if (conn.window_id() < 0)
|
||||
return IterationDecision::Continue;
|
||||
|
||||
conn.async_keymap_changed(conn.window_id(), keymap);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
};
|
||||
|
||||
Compositor::the().did_construct_window_manager({});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue