mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
WindowServer: Menu windows shouldn't steal focus when clicked.
This commit is contained in:
@@ -507,7 +507,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event)
|
||||
for (auto* window = m_windows_in_order.tail(); window; window = window->prev()) {
|
||||
if (!window->is_visible())
|
||||
continue;
|
||||
if (title_bar_rect(window->rect()).contains(event.position())) {
|
||||
if (window->type() != WSWindowType::Menu && title_bar_rect(window->rect()).contains(event.position())) {
|
||||
if (event.type() == WSMessage::MouseDown) {
|
||||
move_to_front(*window);
|
||||
set_active_window(window);
|
||||
@@ -521,7 +521,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event)
|
||||
}
|
||||
|
||||
if (window->rect().contains(event.position())) {
|
||||
if (event.type() == WSMessage::MouseDown) {
|
||||
if (window->type() != WSWindowType::Menu && event.type() == WSMessage::MouseDown) {
|
||||
move_to_front(*window);
|
||||
set_active_window(window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user