diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-04-24 07:50:07 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-04-24 07:50:07 +0200 |
commit | ff31390ab0a1c7abdd712d99b827b20bd532ecd9 (patch) | |
tree | 880bd2182b1d032f2e1989f1b70d410f418bd770 /src/x11/window/mod.rs | |
parent | d8cd748e35c1ab254d398a7ffa6f923799c9c28d (diff) | |
parent | 4a83ab6e02befbaf54e82febc1b8202cef24e09e (diff) | |
download | glutin-ff31390ab0a1c7abdd712d99b827b20bd532ecd9.tar.gz glutin-ff31390ab0a1c7abdd712d99b827b20bd532ecd9.zip |
Merge pull request #390 from glennw/upstream-wm-class
Set WM_CLASS based on initial window title.
Diffstat (limited to 'src/x11/window/mod.rs')
-rw-r--r-- | src/x11/window/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 9f600a8..8f30373 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -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 { |