mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 14:51:30 +11:00
wayland: Resized event
This commit is contained in:
parent
bfc709fdd1
commit
f3e67128db
|
@ -218,4 +218,11 @@ impl WaylandContext {
|
||||||
p.lock().unwrap().remove_handled_surface(sid);
|
p.lock().unwrap().remove_handled_surface(sid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn push_event_for(&self, sid: SurfaceId, evt: Event) {
|
||||||
|
let mut guard = self.windows_event_queues.lock().unwrap();
|
||||||
|
if let Some(queue) = guard.get(&sid) {
|
||||||
|
queue.lock().unwrap().push_back(evt);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -134,6 +134,13 @@ impl Window {
|
||||||
if let Some(f) = self.resize_callback {
|
if let Some(f) = self.resize_callback {
|
||||||
f(w as u32, h as u32);
|
f(w as u32, h as u32);
|
||||||
}
|
}
|
||||||
|
if let Some(ref ctxt) = *WAYLAND_CONTEXT {
|
||||||
|
let mut window_guard = self.shell_window.lock().unwrap();
|
||||||
|
ctxt.push_event_for(
|
||||||
|
window_guard.get_shell().get_wsurface().get_id(),
|
||||||
|
Event::Resized(w as u32, h as u32)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
b
|
b
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue