glutin: On desktop, use the same app icon we use on Android.

This makes the app easier to pick out in Instruments.app and so forth.
This commit is contained in:
Patrick Walton 2016-05-10 18:09:04 -07:00 committed by Anthony Ramine
parent d0b7a9f533
commit 981ad2d89c
2 changed files with 6 additions and 1 deletions

View file

@ -34,6 +34,7 @@ use util::geometry::ScreenPx;
use util::opts;
#[cfg(not(target_os = "android"))]
use util::opts::RenderApi;
use util::resource_files;
static mut g_nested_event_loop_listener: Option<*mut (NestedEventLoopListener + 'static)> = None;
@ -109,6 +110,9 @@ impl Window {
// #9996.
let visible = is_foreground && !opts::get().no_native_titlebar;
let mut icon_path = resource_files::resources_dir_path();
icon_path.push("servo.png");
let mut builder =
glutin::WindowBuilder::new().with_title("Servo".to_string())
.with_decorations(!opts::get().no_native_titlebar)
@ -117,7 +121,8 @@ impl Window {
.with_gl(Window::gl_version())
.with_visibility(visible)
.with_parent(parent)
.with_multitouch();
.with_multitouch()
.with_icon(icon_path);
if opts::get().enable_vsync {
builder = builder.with_vsync();

BIN
resources/servo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 KiB