summaryrefslogtreecommitdiff
path: root/Userland/Applications/Terminal
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2022-08-22 12:52:21 -0400
committerAndreas Kling <kling@serenityos.org>2022-08-25 13:28:50 +0200
commit0d4fd4e2a66bf7d8224c6490c92bf133130923ac (patch)
treec893db36c5b4b2530cccbb7a13150548bb8222c8 /Userland/Applications/Terminal
parent589572cfa44308c4cfc62f366e95c97c7e6cdc9c (diff)
downloadserenity-0d4fd4e2a66bf7d8224c6490c92bf133130923ac.zip
LibGfx+LibGUI+WindowServer+Apps+Demos: Replace ToolWindows
with the RenderAbove WindowMode. This mode will ensure child windows always draw above their parents, even when focus is lost. RenderAbove modals are automatically themed the same as the old ToolWindows. Fixes ToolWindows rendering above ALL normal windows, regardless of parent. We can't rely on WindowType to create these sort of effects because of WindowManager's strict display hierarchy.
Diffstat (limited to 'Userland/Applications/Terminal')
-rw-r--r--Userland/Applications/Terminal/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp
index 1866973673..481fcc1ad8 100644
--- a/Userland/Applications/Terminal/main.cpp
+++ b/Userland/Applications/Terminal/main.cpp
@@ -170,8 +170,8 @@ static ErrorOr<void> run_command(String command, bool keep_open)
static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget& terminal)
{
- auto window = TRY(GUI::Window::try_create());
- window->set_window_type(GUI::WindowType::ToolWindow);
+ auto window = TRY(GUI::Window::try_create(&terminal));
+ window->set_window_mode(GUI::WindowMode::RenderAbove);
window->set_title("Find in Terminal");
window->set_resizable(false);
window->resize(300, 90);
@@ -416,10 +416,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
})));
TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Terminal", app_icon, window)));
- window->on_close = [&]() {
- find_window->close();
- };
-
window->on_close_request = [&]() -> GUI::Window::CloseRequestDecision {
if (check_terminal_quit() == GUI::MessageBox::ExecResult::OK)
return GUI::Window::CloseRequestDecision::Close;