Skip to content

Commit

Permalink
glutin: On desktop, use the same app icon we use on Android.
Browse files Browse the repository at this point in the history
This makes the app easier to pick out in Instruments.app and so forth.
  • Loading branch information
pcwalton authored and nox committed May 16, 2016
1 parent d0b7a9f commit 981ad2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ports/glutin/window.rs
Expand Up @@ -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;

Expand Down Expand Up @@ -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)
Expand All @@ -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();
Expand Down
Binary file added resources/servo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 981ad2d

Please sign in to comment.