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:
parent
ea682207d0
commit
c1476c3405
2 changed files with 156 additions and 141 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue