mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 22:00:04 -04:00
Set WM_CLASS based on initial window title.
This commit is contained in:
@@ -510,6 +510,16 @@ impl Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set ICCCM WM_CLASS property based on initial window title
|
||||||
|
unsafe {
|
||||||
|
with_c_str(&*builder.title, |c_name| {
|
||||||
|
let hint = ffi::XAllocClassHint();
|
||||||
|
(*hint).res_name = c_name as *mut i8;
|
||||||
|
(*hint).res_class = c_name as *mut i8;
|
||||||
|
ffi::XSetClassHint(display, window, hint);
|
||||||
|
ffi::XFree(hint as *mut libc::c_void);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// creating GL context
|
// creating GL context
|
||||||
let (context, extra_functions) = unsafe {
|
let (context, extra_functions) = unsafe {
|
||||||
|
|||||||
Reference in New Issue
Block a user