Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.h	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.h	(revision 58142)
@@ -24,4 +24,5 @@
 /* GUI includes: */
 #include "VBoxCocoaHelper.h"
+#include "VBoxUtils-darwin.h"
 
 ADD_COCOA_NATIVE_REF(UICocoaApplicationPrivate);
@@ -29,4 +30,5 @@
 ADD_COCOA_NATIVE_REF(NSString);
 ADD_COCOA_NATIVE_REF(NSWindow);
+ADD_COCOA_NATIVE_REF(NSButton);
 
 /* Forward declarations: */
@@ -46,4 +48,6 @@
 /** Native notification callback type for QWidget. */
 typedef void (*PfnNativeNotificationCallbackForQWidget)(const QString &strNativeNotificationName, QWidget *pWidget);
+/** Standard window button callback type for QWidget. */
+typedef void (*PfnStandardWindowButtonCallbackForQWidget)(StandardWindowButtonType emnButtonType, bool fWithOptionKey, QWidget *pWidget);
 
 /* C++ singleton for our private NSApplication object. */
@@ -84,4 +88,11 @@
     void nativeNotificationProxyForWidget(NativeNSStringRef pstrNativeNotificationName, NativeNSWindowRef pWindow);
 
+    /** Register callback for standard window @a buttonType of passed @a pWidget as @a pCallback. */
+    void registerCallbackForStandardWindowButton(QWidget *pWidget, StandardWindowButtonType enmButtonType, PfnStandardWindowButtonCallbackForQWidget pCallback);
+    /** Unregister callback for standard window @a buttonType of passed @a pWidget. */
+    void unregisterCallbackForStandardWindowButton(QWidget *pWidget, StandardWindowButtonType enmButtonType);
+    /** Redirects standard window button selector to registered callback. */
+    void nativeCallbackProxyForStandardWindowButton(NativeNSButtonRef pButton, bool fWithOptionKey);
+
 private:
 
@@ -101,4 +112,7 @@
     /** Map of notification callbacks registered for corresponding QWidget(s). */
     QMap<QWidget*, QMap<QString, PfnNativeNotificationCallbackForQWidget> > m_widgetCallbacks;
+
+    /** Map of callbacks registered for standard window button(s) of corresponding QWidget(s). */
+    QMap<QWidget*, QMap<StandardWindowButtonType, PfnStandardWindowButtonCallbackForQWidget> > m_stdWindowButtonCallbacks;
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.mm
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.mm	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.mm	(revision 58142)
@@ -18,5 +18,4 @@
 /* GUI includes: */
 #include "UICocoaApplication.h"
-#include "VBoxUtils-darwin.h"
 
 /* Global includes */
@@ -25,4 +24,5 @@
 #import <Foundation/NSArray.h>
 #import <AppKit/NSWindow.h>
+#import <AppKit/NSButton.h>
 
 #include <iprt/assert.h>
@@ -77,4 +77,7 @@
 - (void)notificationCallbackOfObject :(NSNotification*)notification;
 - (void)notificationCallbackOfWindow :(NSNotification*)notification;
+
+- (void)registerSelectorForStandardWindowButton :(NSWindow*)pWindow :(StandardWindowButtonType)enmButtonType;
+- (void)selectorForStandardWindowButton :(NSButton*)pButton;
 @end /* @interface UICocoaApplicationPrivate */
 
@@ -242,4 +245,38 @@
     UICocoaApplication::instance()->nativeNotificationProxyForWidget(pstrName, [notification object]);
 }
+
+/** Registers selector for standard window @a enmButtonType of the passed @a pWindow. */
+- (void)registerSelectorForStandardWindowButton :(NSWindow*)pWindow :(StandardWindowButtonType)enmButtonType
+{
+    /* Retrieve corresponding button: */
+    NSButton *pButton = Nil;
+    switch (enmButtonType)
+    {
+        case StandardWindowButtonType_Close:            pButton = [pWindow standardWindowButton:NSWindowCloseButton]; break;
+        case StandardWindowButtonType_Miniaturize:      pButton = [pWindow standardWindowButton:NSWindowMiniaturizeButton]; break;
+        case StandardWindowButtonType_Zoom:             pButton = [pWindow standardWindowButton:NSWindowZoomButton]; break;
+        case StandardWindowButtonType_Toolbar:          pButton = [pWindow standardWindowButton:NSWindowToolbarButton]; break;
+        case StandardWindowButtonType_DocumentIcon:     pButton = [pWindow standardWindowButton:NSWindowDocumentIconButton]; break;
+        case StandardWindowButtonType_DocumentVersions: /*pButton = [pWindow standardWindowButton:NSWindowDocumentVersionsButton];*/ break;
+        case StandardWindowButtonType_FullScreen:       /*pButton = [pWindow standardWindowButton:NSWindowFullScreenButton];*/ break;
+    }
+
+    /* Register selector if button exists: */
+    if (pButton != Nil)
+    {
+        [pButton setTarget :self];
+        [pButton setAction :@selector(selectorForStandardWindowButton:)];
+    }
+}
+
+/** Redirects selector of the standard window @a pButton to UICocoaApplication instance callback. */
+- (void)selectorForStandardWindowButton :(NSButton*)pButton
+{
+    /* Check if Option key is currently held: */
+    const bool fWithOptionKey = [NSEvent modifierFlags] & NSAlternateKeyMask;
+
+    /* Redirect selector to callback: */
+    UICocoaApplication::instance()->nativeCallbackProxyForStandardWindowButton(pButton, fWithOptionKey);
+}
 @end /* @implementation UICocoaApplicationPrivate */
 
@@ -384,2 +421,49 @@
 }
 
+void UICocoaApplication::registerCallbackForStandardWindowButton(QWidget *pWidget, StandardWindowButtonType enmButtonType,
+                                                                 PfnStandardWindowButtonCallbackForQWidget pCallback)
+{
+    /* Make sure it is not registered yet: */
+    AssertReturnVoid(!m_stdWindowButtonCallbacks.contains(pWidget) || !m_stdWindowButtonCallbacks.value(pWidget).contains(enmButtonType));
+
+    /* Remember callback: */
+    m_stdWindowButtonCallbacks[pWidget][enmButtonType] = pCallback;
+
+    /* Register selector: */
+    NativeNSWindowRef pWindow = darwinToNativeWindow(pWidget);
+    [m_pNative registerSelectorForStandardWindowButton :pWindow :enmButtonType];
+}
+
+void UICocoaApplication::unregisterCallbackForStandardWindowButton(QWidget *pWidget, StandardWindowButtonType enmButtonType)
+{
+    /* Make sure it is registered yet: */
+    AssertReturnVoid(m_stdWindowButtonCallbacks.contains(pWidget) && m_stdWindowButtonCallbacks.value(pWidget).contains(enmButtonType));
+
+    /* Forget callback: */
+    m_stdWindowButtonCallbacks[pWidget].remove(enmButtonType);
+    if (m_stdWindowButtonCallbacks.value(pWidget).isEmpty())
+        m_stdWindowButtonCallbacks.remove(pWidget);
+}
+
+void UICocoaApplication::nativeCallbackProxyForStandardWindowButton(NativeNSButtonRef pButton, bool fWithOptionKey)
+{
+    // Why not using nested foreach, will you ask?
+    // It's because Qt 4.x has shadowing issue in Q_FOREACH macro.
+    // Bug record QTBUG-33585 opened for Qt 4.8.4 and closed as _won't fix_ by one of Qt devs.
+
+    /* Check if passed button is one of the buttons of the registered widget(s): */
+    const QList<QWidget*> widgets = m_stdWindowButtonCallbacks.keys();
+    for (int iWidgetIndex = 0; iWidgetIndex < widgets.size(); ++iWidgetIndex)
+    {
+        QWidget *pWidget = widgets.at(iWidgetIndex);
+        const QMap<StandardWindowButtonType, PfnStandardWindowButtonCallbackForQWidget> callbacks = m_stdWindowButtonCallbacks.value(pWidget);
+        const QList<StandardWindowButtonType> buttonTypes = callbacks.keys();
+        for (int iButtonTypeIndex = 0; iButtonTypeIndex < buttonTypes.size(); ++iButtonTypeIndex)
+        {
+            StandardWindowButtonType enmButtonType = buttonTypes.at(iButtonTypeIndex);
+            if (darwinNativeButtonOfWindow(pWidget, enmButtonType) == pButton)
+                return callbacks.value(enmButtonType)(enmButtonType, fWithOptionKey, pWidget);
+        }
+    }
+}
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm	(revision 58142)
@@ -53,4 +53,21 @@
 
     return view;
+}
+
+NativeNSButtonRef darwinNativeButtonOfWindowImpl(NativeNSWindowRef pWindow, StandardWindowButtonType enmButtonType)
+{
+    /* Return corresponding button: */
+    switch (enmButtonType)
+    {
+        case StandardWindowButtonType_Close:            return [pWindow standardWindowButton:NSWindowCloseButton];
+        case StandardWindowButtonType_Miniaturize:      return [pWindow standardWindowButton:NSWindowMiniaturizeButton];
+        case StandardWindowButtonType_Zoom:             return [pWindow standardWindowButton:NSWindowZoomButton];
+        case StandardWindowButtonType_Toolbar:          return [pWindow standardWindowButton:NSWindowToolbarButton];
+        case StandardWindowButtonType_DocumentIcon:     return [pWindow standardWindowButton:NSWindowDocumentIconButton];
+        case StandardWindowButtonType_DocumentVersions: /*return [pWindow standardWindowButton:NSWindowDocumentVersionsButton];*/ break;
+        case StandardWindowButtonType_FullScreen:       /*return [pWindow standardWindowButton:NSWindowFullScreenButton];*/ break;
+    }
+    /* Return Nul by default: */
+    return Nil;
 }
 
@@ -215,4 +232,11 @@
     if ([pWindow respondsToSelector: @selector(toggleFullScreen:)])
         [pWindow performSelector: @selector(toggleFullScreen:) withObject: (id)nil];
+}
+
+void darwinToggleWindowZoom(NativeNSWindowRef pWindow)
+{
+    /* Toggle native window zoom for passed pWindow. This method is available since 10.0. */
+    if ([pWindow respondsToSelector: @selector(zoom:)])
+        [pWindow performSelector: @selector(zoom:)];
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp	(revision 58142)
@@ -57,4 +57,9 @@
 }
 
+NativeNSWindowRef darwinNativeButtonOfWindow(QWidget *pWidget, StandardWindowButtonType enmButtonType)
+{
+    return ::darwinNativeButtonOfWindowImpl(::darwinToNativeWindow(pWidget), enmButtonType);
+}
+
 void darwinSetShowsToolbarButton(QToolBar *aToolBar, bool fEnabled)
 {
@@ -157,4 +162,9 @@
 {
     return ::darwinToggleFullscreenMode(::darwinToNativeWindow(pWidget));
+}
+
+void darwinToggleWindowZoom(QWidget *pWidget)
+{
+    return ::darwinToggleWindowZoom(::darwinToNativeWindow(pWidget));
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h	(revision 58142)
@@ -29,4 +29,5 @@
 ADD_COCOA_NATIVE_REF(NSView);
 ADD_COCOA_NATIVE_REF(NSWindow);
+ADD_COCOA_NATIVE_REF(NSButton);
 ADD_COCOA_NATIVE_REF(NSString);
 
@@ -38,4 +39,16 @@
 class QWidget;
 
+/** Mac OS X: Standard window button types. */
+enum StandardWindowButtonType
+{
+    StandardWindowButtonType_Close,            // Since OS X 10.2
+    StandardWindowButtonType_Miniaturize,      // Since OS X 10.2
+    StandardWindowButtonType_Zoom,             // Since OS X 10.2
+    StandardWindowButtonType_Toolbar,          // Since OS X 10.2
+    StandardWindowButtonType_DocumentIcon,     // Since OS X 10.2
+    StandardWindowButtonType_DocumentVersions, // Since OS X 10.7
+    StandardWindowButtonType_FullScreen        // Since OS X 10.7
+};
+
 RT_C_DECLS_BEGIN
 
@@ -47,4 +60,5 @@
 NativeNSWindowRef darwinToNativeWindowImpl(NativeNSViewRef pView);
 NativeNSViewRef darwinToNativeViewImpl(NativeNSWindowRef pWindow);
+NativeNSButtonRef darwinNativeButtonOfWindowImpl(NativeNSWindowRef pWindow, StandardWindowButtonType enmButtonType);
 NativeNSStringRef darwinToNativeString(const char* pcszString);
 QString darwinFromNativeString(NativeNSStringRef pString);
@@ -81,4 +95,5 @@
 void darwinEnableTransienceSupport(NativeNSWindowRef pWindow);
 void darwinToggleFullscreenMode(NativeNSWindowRef pWindow);
+void darwinToggleWindowZoom(NativeNSWindowRef pWindow);
 bool darwinIsInFullscreenMode(NativeNSWindowRef pWindow);
 bool darwinIsOnActiveSpace(NativeNSWindowRef pWindow);
@@ -160,4 +175,13 @@
  */
 NativeNSViewRef darwinToNativeView(NativeNSWindowRef pWindow);
+
+/**
+ * Returns a reference to the native button of QWidget.
+ *
+ * @returns corresponding NSButton* of the QWidget.
+ * @param   pWidget       Brings the pointer to the QWidget.
+ * @param   enmButtonType Brings the type of the native button required.
+ */
+NativeNSButtonRef darwinNativeButtonOfWindow(QWidget *pWidget, StandardWindowButtonType enmButtonType);
 
 /********************************************************************************
@@ -251,4 +275,5 @@
 void darwinEnableTransienceSupport(QWidget *pWidget);
 void darwinToggleFullscreenMode(QWidget *pWidget);
+void darwinToggleWindowZoom(QWidget *pWidget);
 bool darwinIsInFullscreenMode(QWidget *pWidget);
 bool darwinIsOnActiveSpace(QWidget *pWidget);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 58142)
@@ -583,4 +583,34 @@
 
 #ifdef Q_WS_MAC
+void UIMachineWindow::handleStandardWindowButtonCallback(StandardWindowButtonType enmButtonType, bool fWithOptionKey)
+{
+    switch (enmButtonType)
+    {
+        case StandardWindowButtonType_Zoom:
+        {
+            /* Handle 'Zoom' button for 'Normal' and 'Scaled' modes: */
+            if (   machineLogic()->visualStateType() == UIVisualStateType_Normal
+                || machineLogic()->visualStateType() == UIVisualStateType_Scale)
+            {
+                if (fWithOptionKey)
+                {
+                    /* Toggle window zoom: */
+                    darwinToggleWindowZoom(this);
+                }
+                else
+                {
+                    /* Enter 'full-screen' mode: */
+                    uisession()->setRequestedVisualState(UIVisualStateType_Invalid);
+                    uisession()->changeVisualState(UIVisualStateType_Fullscreen);
+                }
+            }
+            break;
+        }
+        default:
+            break;
+    }
+}
+
+/* static */
 void UIMachineWindow::handleNativeNotification(const QString &strNativeNotificationName, QWidget *pWidget)
 {
@@ -588,4 +618,5 @@
     LogRel(("GUI: UIMachineWindow::handleNativeNotification: Notification '%s' received\n",
             strNativeNotificationName.toAscii().constData()));
+    AssertPtrReturnVoid(pWidget);
     if (UIMachineWindow *pMachineWindow = qobject_cast<UIMachineWindow*>(pWidget))
     {
@@ -596,4 +627,20 @@
     }
 }
+
+/* static */
+void UIMachineWindow::handleStandardWindowButtonCallback(StandardWindowButtonType enmButtonType, bool fWithOptionKey, QWidget *pWidget)
+{
+    /* Handle arrived callback: */
+    LogRel(("GUI: UIMachineWindow::handleStandardWindowButtonCallback: Callback for standard window button '%d' with option key '%d' received\n",
+            (int)enmButtonType, (int)fWithOptionKey));
+    AssertPtrReturnVoid(pWidget);
+    if (UIMachineWindow *pMachineWindow = qobject_cast<UIMachineWindow*>(pWidget))
+    {
+        /* Redirect arrived callback: */
+        LogRel(("UIMachineWindow::handleStandardWindowButtonCallback: Redirecting callback for standard window button '%d' with option key '%d' to corresponding machine-window...\n",
+                (int)enmButtonType, (int)fWithOptionKey));
+        pMachineWindow->handleStandardWindowButtonCallback(enmButtonType, fWithOptionKey);
+    }
+}
 #endif /* Q_WS_MAC */
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 58142)
@@ -25,4 +25,7 @@
 #include "QIWithRetranslateUI.h"
 #include "UIExtraDataDefs.h"
+#ifdef Q_WS_MAC
+# include "VBoxUtils-darwin.h"
+#endif /* Q_WS_MAC */
 
 /* COM includes: */
@@ -128,4 +131,9 @@
       * @param  strNativeNotificationName  Native notification name. */
     virtual void handleNativeNotification(const QString & /* strNativeNotificationName */) {}
+
+    /** Mac OS X: Handles standard window button callbacks.
+      * @param  enmButtonType   Brings standard window button type.
+      * @param  fWithOptionKey  Brings whether the Option key was held. */
+    virtual void handleStandardWindowButtonCallback(StandardWindowButtonType enmButtonType, bool fWithOptionKey);
 #endif /* Q_WS_MAC */
 
@@ -165,4 +173,10 @@
       * @param  pWidget                    Widget, notification related to. */
     static void handleNativeNotification(const QString &strNativeNotificationName, QWidget *pWidget);
+
+    /** Mac OS X: Handles standard window button callbacks.
+      * @param  enmButtonType   Brings standard window button type.
+      * @param  fWithOptionKey  Brings whether the Option key was held.
+      * @param  pWidget         Brings widget, callback related to. */
+    static void handleStandardWindowButtonCallback(StandardWindowButtonType enmButtonType, bool fWithOptionKey, QWidget *pWidget);
 #endif /* Q_WS_MAC */
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 58142)
@@ -45,4 +45,5 @@
 #  include "VBoxUtils.h"
 #  include "UIImageTools.h"
+#  include "UICocoaApplication.h"
 # endif /* Q_WS_MAC */
 
@@ -303,4 +304,15 @@
         QPixmap betaLabel = ::betaLabel(QSize(100, 16));
         ::darwinLabelWindow(this, &betaLabel, true);
+    }
+
+    /* For 'Yosemite' and above: */
+    if (vboxGlobal().osRelease() >= MacOSXRelease_Yosemite)
+    {
+        /* Enable fullscreen support for every screen which requires it: */
+        if (darwinScreensHaveSeparateSpaces() || m_uScreenId == 0)
+            darwinEnableFullscreenSupport(this);
+        /* Register 'Zoom' button to use our full-screen: */
+        UICocoaApplication::instance()->registerCallbackForStandardWindowButton(this, StandardWindowButtonType_Zoom,
+                                                                                UIMachineWindow::handleStandardWindowButtonCallback);
     }
 #endif /* Q_WS_MAC */
@@ -389,4 +401,13 @@
     /* Call to base-class: */
     UIMachineWindow::saveSettings();
+}
+
+void UIMachineWindowNormal::cleanupVisualState()
+{
+#ifdef Q_WS_MAC
+    /* Unregister 'Zoom' button from using our full-screen since Yosemite: */
+    if (vboxGlobal().osRelease() >= MacOSXRelease_Yosemite)
+        UICocoaApplication::instance()->unregisterCallbackForStandardWindowButton(this, StandardWindowButtonType_Zoom);
+#endif /* Q_WS_MAC */
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h	(revision 58142)
@@ -97,4 +97,6 @@
     /** Save settings routine. */
     void saveSettings();
+    /** Cleanup visual-state routine. */
+    void cleanupVisualState();
     /** Cleanup session connections routine. */
     void cleanupSessionConnections();
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp	(revision 58142)
@@ -36,4 +36,5 @@
 #  include "VBoxUtils.h"
 #  include "UIImageTools.h"
+#  include "UICocoaApplication.h"
 # endif /* Q_WS_MAC */
 
@@ -69,4 +70,15 @@
         QPixmap betaLabel = ::betaLabel(QSize(100, 16));
         ::darwinLabelWindow(this, &betaLabel, true);
+    }
+
+    /* For 'Yosemite' and above: */
+    if (vboxGlobal().osRelease() >= MacOSXRelease_Yosemite)
+    {
+        /* Enable fullscreen support for every screen which requires it: */
+        if (darwinScreensHaveSeparateSpaces() || m_uScreenId == 0)
+            darwinEnableFullscreenSupport(this);
+        /* Register 'Zoom' button to use our full-screen: */
+        UICocoaApplication::instance()->registerCallbackForStandardWindowButton(this, StandardWindowButtonType_Zoom,
+                                                                                UIMachineWindow::handleStandardWindowButtonCallback);
     }
 }
@@ -125,4 +137,13 @@
     UIMachineWindow::saveSettings();
 }
+
+#ifdef Q_WS_MAC
+void UIMachineWindowScale::cleanupVisualState()
+{
+    /* Unregister 'Zoom' button from using our full-screen since Yosemite: */
+    if (vboxGlobal().osRelease() >= MacOSXRelease_Yosemite)
+        UICocoaApplication::instance()->unregisterCallbackForStandardWindowButton(this, StandardWindowButtonType_Zoom);
+}
+#endif /* Q_WS_MAC */
 
 void UIMachineWindowScale::showInNecessaryMode()
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h	(revision 58141)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h	(revision 58142)
@@ -46,4 +46,8 @@
     /** Save settings routine. */
     void saveSettings();
+#ifdef Q_WS_MAC
+    /** Cleanup visual-state routine. */
+    void cleanupVisualState();
+#endif /* Q_WS_MAC */
 
     /** Updates visibility according to visual-state. */
