diff options
author | Damjan Georgievski <gdamjan@gmail.com> | 2016-01-17 18:40:31 +0100 |
---|---|---|
committer | Damjan Georgievski <gdamjan@gmail.com> | 2016-01-17 18:52:21 +0100 |
commit | e9fc0eeb876fca962b7f4a8a1c55ec42bb27e196 (patch) | |
tree | b045227779b674a8c52bed3e3d140672e1cf5c9a | |
parent | c923b27caddf6a18aae89a3ed629753638bdceb7 (diff) | |
download | glutin-e9fc0eeb876fca962b7f4a8a1c55ec42bb27e196.tar.gz glutin-e9fc0eeb876fca962b7f4a8a1c55ec42bb27e196.zip |
call set_title() in new()
…instead of low-level X11 calls that don't work with utf8
-rw-r--r-- | src/api/x11/window.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs index e258926..252af75 100644 --- a/src/api/x11/window.rs +++ b/src/api/x11/window.rs @@ -472,10 +472,6 @@ impl Window { display.check_errors().expect("Failed to call XInternAtom"); (display.xlib.XSetWMProtocols)(display.display, window, &mut wm_delete_window, 1); display.check_errors().expect("Failed to call XSetWMProtocols"); - with_c_str(&*window_attrs.title, |title| {; - (display.xlib.XStoreName)(display.display, window, title); - }); - display.check_errors().expect("Failed to call XStoreName"); (display.xlib.XFlush)(display.display); display.check_errors().expect("Failed to call XFlush"); @@ -639,6 +635,8 @@ impl Window { input_handler: Mutex::new(XInputEventHandler::new(display, window, ic, window_attrs)) }; + window.set_title(&window_attrs.title); + if window_attrs.visible { unsafe { let ref x_window: &XWindow = window.x.borrow(); |