Repository: PistonDevelopers/glfw-rs (language: rust)

Issue:
Creating a maximized window
Is there any way to create a maximized window without having to do the following.

```
let (mut window, events) = glfw.create_window(1, 1, "Title", glfw::WindowMode::Windowed).unwrap();
window.maximize();
```

The documentation describes a window hit called GLFW_MAXIMIZED.
> specifies whether the windowed mode window will be maximized when created. Possible values are GLFW_TRUE and GLFW_FALSE. This hint is ignored for full screen windows.

but that hint isn't present in this crate. Is there some way to accomplish this?


Discussion / hints:
You should be able to call `glfw.window_hint(WindowHint::Maximized(true));` before creating the window, but it seems the hint `WindowHint::Maximized(bool)` is missing for some reason

Fix patch:
diff --git a/src/lib.rs b/src/lib.rs
index ef80398e..5cb378fe 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1016,6 +1016,9 @@ impl Glfw {
             WindowHint::Focused(is_focused) => unsafe {
                 ffi::glfwWindowHint(ffi::FOCUSED, is_focused as c_int)
             },
+            WindowHint::Maximized(is_maximized) => unsafe {
+                ffi::glfwWindowHint(ffi::MAXIMIZED, is_maximized as c_int)
+            },
             WindowHint::ContextNoError(is_no_error) => unsafe {
                 ffi::glfwWindowHint(ffi::CONTEXT_NO_ERROR, is_no_error as c_int)
             },
@@ -1748,6 +1751,10 @@ pub enum WindowHint {
     ///
     /// This hint is ignored for full screen and initially hidden windows.
     Focused(bool),
+    /// Specifies whether the windowed mode window will be maximized when created.
+    ///
+    /// This hint is ignored for full screen windows.
+    Maximized(bool),
     /// Specifies whether the OpenGL or OpenGL ES contexts do not emit errors,
     /// allowing for better performance in some situations.
     ContextNoError(bool),


Test patch: