wayland: implement jay-tray-v1
This commit is contained in:
parent
18bddbc987
commit
8c3cd97ae3
28 changed files with 979 additions and 43 deletions
|
|
@ -6,6 +6,7 @@ use {
|
|||
client::ClientError,
|
||||
ifs::{
|
||||
wl_surface::{
|
||||
tray::TrayItemId,
|
||||
xdg_surface::{
|
||||
xdg_popup::{XdgPopup, XdgPopupError, XdgPopupParent},
|
||||
xdg_toplevel::{XdgToplevel, WM_CAPABILITIES_SINCE},
|
||||
|
|
@ -17,7 +18,7 @@ use {
|
|||
leaks::Tracker,
|
||||
object::Object,
|
||||
rect::Rect,
|
||||
tree::{FindTreeResult, FoundNode, OutputNode, StackedNode, WorkspaceNode},
|
||||
tree::{FindTreeResult, FoundNode, Node, OutputNode, StackedNode, WorkspaceNode},
|
||||
utils::{
|
||||
clonecell::CloneCell,
|
||||
copyhashmap::CopyHashMap,
|
||||
|
|
@ -138,6 +139,10 @@ impl XdgPopupParent for Popup {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn tray_item(&self) -> Option<TrayItemId> {
|
||||
self.parent.clone().tray_item()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
|
|
@ -174,6 +179,14 @@ pub trait XdgSurfaceExt: Debug {
|
|||
fn geometry_changed(&self) {
|
||||
// nothing
|
||||
}
|
||||
|
||||
fn focus_node(&self) -> Option<Rc<dyn Node>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn tray_item(&self) -> Option<TrayItemId> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl XdgSurface {
|
||||
|
|
@ -526,6 +539,14 @@ impl SurfaceExt for XdgSurface {
|
|||
fn extents_changed(&self) {
|
||||
self.update_extents();
|
||||
}
|
||||
|
||||
fn focus_node(&self) -> Option<Rc<dyn Node>> {
|
||||
self.ext.get()?.focus_node()
|
||||
}
|
||||
|
||||
fn tray_item(self: Rc<Self>) -> Option<TrayItemId> {
|
||||
self.ext.get()?.tray_item()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue