mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
Ladybird/AppKit: Handle input events through LibWebView
The AppKit chrome currently handles all input events before selectively forwarding those events to WebContent. This means that WebContent does not see events like cmd+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
c1476c3405
commit
2c31ef11bc
5 changed files with 130 additions and 98 deletions
|
@ -13,12 +13,9 @@
|
|||
#include <LibGfx/Size.h>
|
||||
#include <LibGfx/StandardCursor.h>
|
||||
#include <LibWeb/CSS/PreferredColorScheme.h>
|
||||
#include <LibWeb/Page/InputEvent.h>
|
||||
#include <LibWebView/ViewImplementation.h>
|
||||
|
||||
// FIXME: These should not be included outside of Serenity.
|
||||
#include <Kernel/API/KeyCode.h>
|
||||
#include <LibGUI/Event.h>
|
||||
|
||||
namespace Ladybird {
|
||||
|
||||
class WebViewBridge final : public WebView::ViewImplementation {
|
||||
|
@ -41,14 +38,8 @@ public:
|
|||
void update_palette();
|
||||
void set_preferred_color_scheme(Web::CSS::PreferredColorScheme);
|
||||
|
||||
void mouse_down_event(Gfx::IntPoint, Gfx::IntPoint, GUI::MouseButton, KeyModifier);
|
||||
void mouse_up_event(Gfx::IntPoint, Gfx::IntPoint, GUI::MouseButton, KeyModifier);
|
||||
void mouse_move_event(Gfx::IntPoint, Gfx::IntPoint, GUI::MouseButton, KeyModifier);
|
||||
void mouse_wheel_event(Gfx::IntPoint, Gfx::IntPoint, GUI::MouseButton, KeyModifier, int, int);
|
||||
void mouse_double_click_event(Gfx::IntPoint, Gfx::IntPoint, GUI::MouseButton, KeyModifier);
|
||||
|
||||
void key_down_event(KeyCode, KeyModifier, u32);
|
||||
void key_up_event(KeyCode, KeyModifier, u32);
|
||||
void enqueue_input_event(Web::MouseEvent);
|
||||
void enqueue_input_event(Web::KeyEvent);
|
||||
|
||||
struct Paintable {
|
||||
Gfx::Bitmap& bitmap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue