mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
WindowServer: Make Menus the input window when showing them
This solves a problem where windows don't receive a WindowInputLeft event when popup menus are opened. This prevented ComboBox being closed when right clicking the application on the task bar.
This commit is contained in:
parent
59596ff816
commit
8286e72187
8 changed files with 125 additions and 62 deletions
|
@ -590,6 +590,18 @@ void Window::set_parent_window(Window& parent_window)
|
|||
parent_window.add_child_window(*this);
|
||||
}
|
||||
|
||||
bool Window::is_accessory() const
|
||||
{
|
||||
if (!m_accessory)
|
||||
return false;
|
||||
if (parent_window() != nullptr)
|
||||
return true;
|
||||
|
||||
// If accessory window was unparented, convert to a regular window
|
||||
const_cast<Window*>(this)->set_accessory(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Window::is_accessory_of(Window& window) const
|
||||
{
|
||||
if (!is_accessory())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue