From 9322f0d11081cb77c1e4f03455caa54e19a6b8b4 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 19 Jan 2024 12:48:43 +0000 Subject: [PATCH] HackStudio: Use Autocomplete window type for Locator pop-up This being a Popup window meant it behaved in a couple of janky ways: - It would steal the focus each time it was shown, so after every key press in the TextBox. - It would disappear when you focused that TextBox again. Using the Autocomplete window type fixes both of these. While the Locator is not technically an autocomplete, it shares the general "type and get suggestions based on the input, which you can select" behavior, so this is close enough. --- Userland/DevTools/HackStudio/Locator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/DevTools/HackStudio/Locator.cpp b/Userland/DevTools/HackStudio/Locator.cpp index 54b031949f..4d309d1bec 100644 --- a/Userland/DevTools/HackStudio/Locator.cpp +++ b/Userland/DevTools/HackStudio/Locator.cpp @@ -146,7 +146,7 @@ Locator::Locator(Core::EventReceiver* parent) }; m_popup_window = GUI::Window::construct(parent); - m_popup_window->set_window_type(GUI::WindowType::Popup); + m_popup_window->set_window_type(GUI::WindowType::Autocomplete); m_popup_window->set_rect(0, 0, 500, 200); m_suggestion_view = m_popup_window->set_main_widget();