         resizeSubviews(withOldSize: sizeBeforeHidden)
         setFrameSize(hiddenSize)
 
-        // Finally resize the window, causing our height to increase.
-        changeWindowHeight(by: originalHeight - hiddenHeight)
-
-        if originalNextKeyView != nil {
-            // Restore the key loop to its old configuration.
-            lastChildKeyView?.nextKeyView = nextKeyView
-            nextKeyView = originalNextKeyView
-        }
-
-        needsDisplay = true
+        let completion = { [self] in
+            if originalNextKeyView != nil {
+                // Restore the key loop to its old configuration.
+                lastChildKeyView?.nextKeyView = nextKeyView
+                nextKeyView = originalNextKeyView
+            }
+
+            needsDisplay = true
+        }
+
+        if let window = window, window.styleMask.contains(.fullScreen) {
+            // We're in full screen, so we can't resize the window. Resize ourself and other content views instead.
+            NSAnimationContext.runAnimationGroup { animationContext in
+                animationContext.completionHandler = completion
+                animationContext.allowsImplicitAnimation = true
+                changeSelfHeightAndAdjustOtherContentViews(by: (originalHeight - hiddenHeight))
+            }
+        }
+        else {
+            // Finally resize the window, causing our height to increase.
+            changeWindowHeight(by: originalHeight - hiddenHeight)
+            completion()
+        }
     }
 
     private func removeSubviews() {

        // (The window width may change while the subviews are hidden.)
        sizeBeforeHidden = frame.size

        // Now shrink the window, causing this view to shrink and our subviews to be obscured.
        // Also remove the subviews from the view hierarchy.
        changeWindowHeight(by: -(originalHeight - hiddenHeight))
        removeSubviews()

        needsDisplay = true
    }

    private func show() {

        }
    }

    private func changeSelfHeightAndAdjustOtherContentViews(by amount: CGFloat) {
        guard let window = window else { return }

        // Change this view's height by the given amount, and adjust the window's content view's other subviews
        // to make sense. Specifically, the subviews below us. If the subview can resize, change its height;
        // if it can't, change its position.

        for windowSubview in window.contentView?.subviews ?? [] {
            if windowSubview == self {
                // This is us. Resize to be shorter or taller, keeping the same top (maxY).
                var frame = windowSubview.frame
                frame.origin.y -= amount
                frame.size.height += amount
                windowSubview.frame = frame
            }
            else if windowSubview.frame.maxY < self.frame.maxY {
                // This subview is below us
                if windowSubview.autoresizingMask.contains(.height) {
                    // and resizes when the window height changes. Make it taller or shorter, staying fixed to the bottom of the window.
                    var frame = windowSubview.frame
                    frame.size.height -= amount
                    windowSubview.frame = frame
                }
                else {
                    // and doesn't resize when the window height changes. Keep its same top (maxY).
                    var frame = windowSubview.frame
                    frame.origin.y -= amount
                    windowSubview.frame = frame
                }
            }
            else {
                // This subview is above us. Don't change it.
            }
        }
    }

}
