mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:37:34 +00:00
WindowServer: Menu windows shouldn't steal focus when clicked.
This commit is contained in:
parent
961783e0df
commit
1d7fc866ee
1 changed files with 2 additions and 2 deletions
|
@ -507,7 +507,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event)
|
||||||
for (auto* window = m_windows_in_order.tail(); window; window = window->prev()) {
|
for (auto* window = m_windows_in_order.tail(); window; window = window->prev()) {
|
||||||
if (!window->is_visible())
|
if (!window->is_visible())
|
||||||
continue;
|
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) {
|
if (event.type() == WSMessage::MouseDown) {
|
||||||
move_to_front(*window);
|
move_to_front(*window);
|
||||||
set_active_window(window);
|
set_active_window(window);
|
||||||
|
@ -521,7 +521,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->rect().contains(event.position())) {
|
if (window->rect().contains(event.position())) {
|
||||||
if (event.type() == WSMessage::MouseDown) {
|
if (window->type() != WSWindowType::Menu && event.type() == WSMessage::MouseDown) {
|
||||||
move_to_front(*window);
|
move_to_front(*window);
|
||||||
set_active_window(window);
|
set_active_window(window);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue