Still need to wire up MouseMove with the new regions
This commit is contained in:
parent
3709eff34b
commit
b910c85f7f
7 changed files with 82 additions and 33 deletions
|
@ -1890,6 +1890,7 @@ impl AppContext {
|
|||
|
||||
fn handle_repaint_window_effect(&mut self, window: AnyWindowHandle) {
|
||||
self.update_window(window, |cx| {
|
||||
cx.layout(false).log_err();
|
||||
if let Some(scene) = cx.paint().log_err() {
|
||||
cx.window.platform_window.present_scene(scene);
|
||||
}
|
||||
|
@ -3655,12 +3656,6 @@ impl<'a, 'b, 'c, V: 'static> EventContext<'a, 'b, 'c, V> {
|
|||
pub fn propagate_event(&mut self) {
|
||||
self.handled = false;
|
||||
}
|
||||
|
||||
pub fn repaint(&mut self) {
|
||||
let window = self.window();
|
||||
self.pending_effects
|
||||
.push_back(Effect::RepaintWindow { window });
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'b, 'c, V> Deref for EventContext<'a, 'b, 'c, V> {
|
||||
|
|
|
@ -220,6 +220,12 @@ impl<'a> WindowContext<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn repaint(&mut self) {
|
||||
let window = self.window();
|
||||
self.pending_effects
|
||||
.push_back(Effect::RepaintWindow { window });
|
||||
}
|
||||
|
||||
pub fn layout_engine(&mut self) -> Option<&mut LayoutEngine> {
|
||||
self.window.layout_engines.last_mut()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue