mirror of
https://github.com/servo/servo.git
synced 2025-09-04 20:18:21 +01:00
constellation: notify embedder when events are hit-tested to browsers (#30841)
* constellation: notify embedder when events are hit-tested to browsers * fix compile error in libsimpleservo * impl From<&CompositorEvent> for CompositorEventVariant * remove msg temporaries in Constellation::forward_event * use single wildcard arm in EventDelivered case in handle_servo_events
This commit is contained in:
parent
676c170b07
commit
8a226fdb19
5 changed files with 58 additions and 10 deletions
|
@ -14,8 +14,8 @@ use keyboard_types::{Key, KeyboardEvent, Modifiers, ShortcutMatcher};
|
|||
use log::{debug, error, info, trace, warn};
|
||||
use servo::compositing::windowing::{EmbedderEvent, WebRenderDebugOption};
|
||||
use servo::embedder_traits::{
|
||||
ContextMenuResult, EmbedderMsg, FilterPattern, PermissionPrompt, PermissionRequest,
|
||||
PromptDefinition, PromptOrigin, PromptResult,
|
||||
CompositorEventVariant, ContextMenuResult, EmbedderMsg, FilterPattern, PermissionPrompt,
|
||||
PermissionRequest, PromptDefinition, PromptOrigin, PromptResult,
|
||||
};
|
||||
use servo::msg::constellation_msg::{TopLevelBrowsingContextId as BrowserId, TraversalDirection};
|
||||
use servo::script_traits::TouchEventType;
|
||||
|
@ -545,6 +545,13 @@ where
|
|||
EmbedderMsg::ReadyToPresent => {
|
||||
need_present = true;
|
||||
},
|
||||
EmbedderMsg::EventDelivered(event) => match (browser_id, event) {
|
||||
(Some(browser_id), CompositorEventVariant::MouseButtonEvent) => {
|
||||
// TODO Focus browser and/or raise to top if needed.
|
||||
trace!("{}: Got a mouse button event", browser_id);
|
||||
},
|
||||
(_, _) => {},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue