1
0
Fork 0

Add title changing

This commit is contained in:
Charles Saracco 2020-05-25 15:51:10 -04:00
parent 741318b7f6
commit 7eecb4675e
2 changed files with 14 additions and 2 deletions

View file

@ -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,
};

View file

@ -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();