From a66fe2721b7f456de25e763b35f070cde3d720de Mon Sep 17 00:00:00 2001
From: Marco Antognini <antognini.marco@gmail.com>
Date: Wed, 9 Oct 2013 10:42:36 +0200
Subject: [PATCH] Improved resizing window on OS X (#474)

---
 src/SFML/Window/OSX/SFWindowController.mm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/SFML/Window/OSX/SFWindowController.mm b/src/SFML/Window/OSX/SFWindowController.mm
index a62cb03d..1a237c9b 100644
--- a/src/SFML/Window/OSX/SFWindowController.mm
+++ b/src/SFML/Window/OSX/SFWindowController.mm
@@ -339,6 +339,12 @@
 ////////////////////////////////////////////////////////
 -(void)resizeTo:(unsigned int)width by:(unsigned int)height
 {
+    // Before resizing, remove resizeable mask to be able to resize
+    // beyond the desktop boundaries.
+    NSUInteger styleMask = [m_window styleMask];
+
+    [m_window setStyleMask:styleMask ^ NSResizableWindowMask];
+
     // Add titlebar height.
     NSRect frame = NSMakeRect([m_window frame].origin.x,
                               [m_window frame].origin.y,
@@ -346,6 +352,9 @@
                               height + [self titlebarHeight]);
 
     [m_window setFrame:frame display:YES];
+
+    // And restore the mask
+    [m_window setStyleMask:styleMask];
 }