Add title changing
This commit is contained in:
parent
741318b7f6
commit
7eecb4675e
|
@ -1,8 +1,8 @@
|
|||
fn main() {
|
||||
let window_open_options = baseview::WindowOpenOptions {
|
||||
title: "baseview",
|
||||
width: 1024,
|
||||
height: 1024,
|
||||
width: 512,
|
||||
height: 512,
|
||||
parent: baseview::Parent::None,
|
||||
};
|
||||
|
||||
|
|
12
src/x11.rs
12
src/x11.rs
|
@ -69,6 +69,18 @@ impl X11Window {
|
|||
event_mask,
|
||||
);
|
||||
|
||||
// Change window title
|
||||
let title = options.title;
|
||||
xcb::change_property(
|
||||
&conn,
|
||||
xcb::PROP_MODE_REPLACE as u8,
|
||||
win,
|
||||
xcb::ATOM_WM_NAME,
|
||||
xcb::ATOM_STRING,
|
||||
8,
|
||||
title.as_bytes(),
|
||||
);
|
||||
|
||||
// Display the window
|
||||
xcb::map_window(&conn, win);
|
||||
conn.flush();
|
||||
|
|
Loading…
Reference in a new issue