mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibGUI: Don't bubble window events up to parent windows
Always accept the events so that they don't bubble up to the parent object. Fixes #4967
This commit is contained in:
parent
d312011708
commit
20f53c7462
Notes:
sideshowbarker
2024-07-18 23:10:49 +09:00
Author: https://github.com/tomuta
Commit: 20f53c7462
Pull-request: https://github.com/SerenityOS/serenity/pull/4969
Issue: https://github.com/SerenityOS/serenity/issues/4967
1 changed files with 5 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <AK/HashMap.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/NeverDestroyed.h>
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/MimeData.h>
|
||||
#include <LibGUI/Action.h>
|
||||
|
@ -490,6 +491,10 @@ void Window::handle_left_event()
|
|||
|
||||
void Window::event(Core::Event& event)
|
||||
{
|
||||
ScopeGuard guard([&] {
|
||||
// Accept the event so it doesn't bubble up to parent windows!
|
||||
event.accept();
|
||||
});
|
||||
if (event.type() == Event::Drop)
|
||||
return handle_drop_event(static_cast<DropEvent&>(event));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue