mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
Compare commits
2 Commits
android-no
...
v0.6.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
444ebc3018 | ||
|
|
f8efe87c34 |
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "winit"
|
name = "winit"
|
||||||
version = "0.6.3"
|
version = "0.6.4"
|
||||||
authors = ["The winit contributors, Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
authors = ["The winit contributors, Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||||
description = "Cross-platform window creation library."
|
description = "Cross-platform window creation library."
|
||||||
keywords = ["windowing"]
|
keywords = ["windowing"]
|
||||||
|
|||||||
@@ -403,6 +403,19 @@ impl Window {
|
|||||||
win
|
win
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Set ICCCM WM_CLASS property based on initial window title
|
||||||
|
// Must be done *before* mapping the window by ICCCM 4.1.2.5
|
||||||
|
unsafe {
|
||||||
|
with_c_str(&*window_attrs.title, |c_name| {
|
||||||
|
let hint = (display.xlib.XAllocClassHint)();
|
||||||
|
(*hint).res_name = c_name as *mut libc::c_char;
|
||||||
|
(*hint).res_class = c_name as *mut libc::c_char;
|
||||||
|
(display.xlib.XSetClassHint)(display.display, window, hint);
|
||||||
|
display.check_errors().expect("Failed to call XSetClassHint");
|
||||||
|
(display.xlib.XFree)(hint as *mut _);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// set visibility
|
// set visibility
|
||||||
if window_attrs.visible {
|
if window_attrs.visible {
|
||||||
unsafe {
|
unsafe {
|
||||||
@@ -466,18 +479,6 @@ impl Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set ICCCM WM_CLASS property based on initial window title
|
|
||||||
unsafe {
|
|
||||||
with_c_str(&*window_attrs.title, |c_name| {
|
|
||||||
let hint = (display.xlib.XAllocClassHint)();
|
|
||||||
(*hint).res_name = c_name as *mut libc::c_char;
|
|
||||||
(*hint).res_class = c_name as *mut libc::c_char;
|
|
||||||
(display.xlib.XSetClassHint)(display.display, window, hint);
|
|
||||||
display.check_errors().expect("Failed to call XSetClassHint");
|
|
||||||
(display.xlib.XFree)(hint as *mut _);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
let is_fullscreen = window_attrs.monitor.is_some();
|
let is_fullscreen = window_attrs.monitor.is_some();
|
||||||
|
|
||||||
if is_fullscreen {
|
if is_fullscreen {
|
||||||
|
|||||||
Reference in New Issue
Block a user