wayland: Implement xdg-activation when opening urls (#11368)
Since Wayland doesn't have a way for windows to activate themselves, currently, when you click on a link in Zed, the browser window opens in the background. This PR implements the `xdg-activation` protocol to get an activation token, which the browser can use to raise its window. https://github.com/zed-industries/zed/assets/71973804/8b3456c0-89f8-4201-b1cb-633a149796b7 Release Notes: - N/A
This commit is contained in:
parent
dccf6dae01
commit
86696d88cf
5 changed files with 79 additions and 5 deletions
|
@ -251,6 +251,10 @@ impl WaylandWindow {
|
|||
}
|
||||
|
||||
impl WaylandWindowStatePtr {
|
||||
pub fn surface(&self) -> wl_surface::WlSurface {
|
||||
self.state.borrow().surface.clone()
|
||||
}
|
||||
|
||||
pub fn ptr_eq(&self, other: &Self) -> bool {
|
||||
Rc::ptr_eq(&self.state, &other.state)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue