mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Set WM_CLASS based on initial window title.
This commit is contained in:
parent
d8cd748e35
commit
4a83ab6e02
|
@ -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
|
||||
let (context, extra_functions) = unsafe {
|
||||
|
|
Loading…
Reference in a new issue