Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a command line option to disable native titlebar #7778

Merged
merged 1 commit into from Sep 29, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Add a command line option to disable native titlebar

  • Loading branch information
paulrouget committed Sep 29, 2015
commit 5be60f2c79f93d5007d4d85216d52bb69ee8e676
@@ -167,6 +167,9 @@ pub struct Opts {

/// True to exit after the page load (`-x`).
pub exit_after_load: bool,

/// Do not use native titlebar
pub no_native_titlebar: bool,
}

fn print_usage(app: &str, opts: &Options) {
@@ -411,6 +414,7 @@ pub fn default_opts() -> Opts {
disable_share_style_cache: false,
parallel_display_list_building: false,
exit_after_load: false,
no_native_titlebar: false,
}
}

@@ -451,6 +455,7 @@ pub fn from_cmdline_args(args: &[String]) {
opts.optflag("", "sniff-mime-types" , "Enable MIME sniffing");
opts.optmulti("", "pref",
"A preference to set to enable", "dom.mozbrowser.enabled");
opts.optflag("b", "no-native-titlebar", "Do not use native titlebar");

let opt_match = match opts.parse(args) {
Ok(m) => m,
@@ -614,6 +619,7 @@ pub fn from_cmdline_args(args: &[String]) {
disable_share_style_cache: debug_options.disable_share_style_cache,
parallel_display_list_building: debug_options.parallel_display_list_building,
exit_after_load: opt_match.opt_present("x"),
no_native_titlebar: opt_match.opt_present("b"),
};

set_defaults(opts);
@@ -87,6 +87,7 @@ impl Window {
parent: glutin::WindowID) -> Rc<Window> {
let mut glutin_window = glutin::WindowBuilder::new()
.with_title("Servo".to_string())
.with_decorations(!opts::get().no_native_titlebar)
.with_dimensions(window_size.to_untyped().width, window_size.to_untyped().height)
.with_gl(Window::gl_version())
.with_visibility(is_foreground)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.