Skip to content

Commit

Permalink
Update message branches
Browse files Browse the repository at this point in the history
  • Loading branch information
wusyong committed May 17, 2024
1 parent 007d5d4 commit bf1cb40
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use servo::{
CompositeTarget,
},
embedder_traits::EventLoopWaker,
msg::constellation_msg::BrowsingContextId,
servo_url::ServoUrl,
Servo, TopLevelBrowsingContextId,
};
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ fn main() -> Result<()> {
event_loop.listen_device_events(DeviceEvents::Never);
let window = WindowBuilder::new()
.with_title("(*゚▽゚)ノ Verso")
// .with_maximized(true)
.build(&event_loop)?;

#[cfg(target_os = "macos")]
Expand Down
15 changes: 7 additions & 8 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,18 @@ impl Window {
Some(p) if p == self.panel.id() => {
log::trace!("Verso Panel {p:?} is handling servo message: {m:?}",);
match m {
EmbedderMsg::LoadStart => {
let mut rect = self.get_coordinates().get_viewport().to_f32();
rect.max.y /= 10.;
events.push(EmbedderEvent::FocusWebView(p));
events.push(EmbedderEvent::MoveResizeWebView(p, rect));
need_present = false;
}
EmbedderMsg::HeadParsed => {
EmbedderMsg::LoadStart | EmbedderMsg::HeadParsed => {
need_present = false;
}
EmbedderMsg::LoadComplete => {
need_present = true;
}
EmbedderMsg::WebViewOpened(w) => {
let mut rect = self.get_coordinates().get_viewport().to_f32();
rect.max.y /= 10.;
events.push(EmbedderEvent::FocusWebView(w));
events.push(EmbedderEvent::MoveResizeWebView(w, rect));
}
EmbedderMsg::WebViewClosed(_w) => {
events.push(EmbedderEvent::Quit);
}
Expand Down

0 comments on commit bf1cb40

Please sign in to comment.