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.

Requires servo/glutin#86, which itself requires servo/cocoa-rs#124.
  • Loading branch information
pcwalton committed May 11, 2016
1 parent 40be84d commit faa6fbf
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use style_traits::cursor::Cursor;
use url::Url;
use util::geometry::ScreenPx;
use util::opts;
use util::resource_files;
#[cfg(not(target_os = "android"))]
use util::opts::RenderApi;

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
Loading
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 faa6fbf

Please sign in to comment.