linux x11 resolution

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-02-11 19:04:33 +08:00
parent 91a2a5b56e
commit 18a66749a1
7 changed files with 180 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ pub struct Display {
default: bool,
rect: Rect,
root: xcb_window_t,
name: String,
}
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
@@ -25,12 +26,14 @@ impl Display {
default: bool,
rect: Rect,
root: xcb_window_t,
name: String,
) -> Display {
Display {
server,
default,
rect,
root,
name,
}
}
@@ -52,4 +55,8 @@ impl Display {
pub fn root(&self) -> xcb_window_t {
self.root
}
pub fn name(&self) -> String {
self.name.clone()
}
}