소스 검색

LibGUI: Disallow shortcut propagation in Blocking modals and Popups

This restriction is already present for mouse shortcuts but was
forgotten in the recent key event refactor.
thankyouverycool 2 년 전
부모
커밋
ef7d9c0
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      Userland/Libraries/LibGUI/Window.cpp

+ 3 - 0
Userland/Libraries/LibGUI/Window.cpp

@@ -503,6 +503,9 @@ void Window::handle_key_event(KeyEvent& event)
     if (event.is_accepted())
         return;
 
+    if (is_blocking() || is_popup())
+        return;
+
     // Only process shortcuts if this is a keydown event.
     if (event.type() == Event::KeyDown)
         propagate_shortcuts_up_to_application(event, nullptr);