1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 08:47:35 +00:00

Ladybird/Qt: Handle input events through LibWebView

The Qt chrome currently handles all input events before selectively
forwarding those events to WebContent. This means that WebContent does
not see events like ctrl+c.

Here, we make use of LibWebView's input handling and wait for LibWebView
to inform the chrome that it should handle the event itself.
This commit is contained in:
Timothy Flynn 2024-03-05 07:53:57 -05:00 committed by Andreas Kling
parent ea682207d0
commit c1476c3405
2 changed files with 156 additions and 141 deletions

View file

@ -24,8 +24,10 @@
#include <QAbstractScrollArea>
#include <QUrl>
class QTextEdit;
class QKeyEvent;
class QLineEdit;
class QSinglePointEvent;
class QTextEdit;
namespace WebView {
class WebContentClient;
@ -93,6 +95,10 @@ private:
void update_viewport_rect();
void update_cursor(Gfx::StandardCursor cursor);
void enqueue_native_event(Web::MouseEvent::Type, QSinglePointEvent const& event);
void enqueue_native_event(Web::KeyEvent::Type, QKeyEvent const& event);
void finish_handling_key_event(Web::KeyEvent const&);
bool m_should_show_line_box_borders { false };
Gfx::IntRect m_viewport_rect;