1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

Applets/Keymap: Repaint applet on demand only

Instead of poking into the the applet window backing store whenever
the keymap changes, we now drive the GUI updates properly via
update() and paint_event().

This fixes an issue where changing the system font would cause a
"ghosting" effect in the keymap applet.
This commit is contained in:
Andreas Kling 2023-03-03 22:46:01 +01:00
parent 66c04b98f1
commit 5979ce8316
3 changed files with 28 additions and 28 deletions

View file

@ -6,8 +6,6 @@
*/
#include "KeymapStatusWindow.h"
#include <LibGUI/Painter.h>
#include <LibGUI/Process.h>
#include <LibKeyboard/CharacterMap.h>
KeymapStatusWindow::KeymapStatusWindow()
@ -17,8 +15,7 @@ KeymapStatusWindow::KeymapStatusWindow()
m_status_widget = set_main_widget<KeymapStatusWidget>().release_value_but_fixme_should_propagate_errors();
auto current_keymap = MUST(Keyboard::CharacterMap::fetch_system_map());
auto current_keymap_name = current_keymap.character_map_name();
m_status_widget->set_current_keymap(current_keymap_name, ClearBackground::No);
m_status_widget->set_current_keymap(current_keymap.character_map_name());
}
void KeymapStatusWindow::wm_event(GUI::WMEvent& event)