1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

Userland: Use GUI::Process::spawn_or_show_error() for spawn() from a GUI

This commit is contained in:
MacDue 2022-05-11 19:41:33 +01:00 committed by Linus Groh
parent 2f2671f2d3
commit 7c8541b914
7 changed files with 39 additions and 26 deletions

View file

@ -6,9 +6,9 @@
*/
#include "KeymapStatusWindow.h"
#include <LibCore/Process.h>
#include <LibGUI/ConnectionToWindowMangerServer.h>
#include <LibGUI/Painter.h>
#include <LibGUI/Process.h>
#include <LibKeyboard/CharacterMap.h>
void KeymapStatusWidget::mousedown_event(GUI::MouseEvent& event)
@ -16,7 +16,7 @@ void KeymapStatusWidget::mousedown_event(GUI::MouseEvent& event)
if (event.button() != GUI::MouseButton::Primary)
return;
MUST(Core::Process::spawn("/bin/KeyboardSettings"));
GUI::Process::spawn_or_show_error(window(), "/bin/KeyboardSettings");
}
KeymapStatusWindow::KeymapStatusWindow()