mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Allow resolution to be configured on command line. Default to 1280x1024.
This commit is contained in:
parent
178843456f
commit
c33f18b7df
7 changed files with 31 additions and 9 deletions
|
@ -63,9 +63,10 @@ pub struct Window {
|
|||
|
||||
impl WindowMethods<Application> for Window {
|
||||
/// Creates a new window.
|
||||
fn new(_: &Application, _: bool) -> Rc<Window> {
|
||||
fn new(_: &Application, _: bool, size: TypedSize2D<DevicePixel, uint>) -> Rc<Window> {
|
||||
// Create the GLUT window.
|
||||
glut::init_window_size(800, 600);
|
||||
let window_size = size.to_untyped();
|
||||
glut::init_window_size(window_size.width, window_size.height);
|
||||
let glut_window = glut::create_window("Servo".to_string());
|
||||
|
||||
// Create our window object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue