# El Capitan: SetFullscreen(), SetResizable(), SetResizeLimits() BROKEN?

**URL:** <https://forum.juce.com/t/el-capitan-setfullscreen-setresizable-setresizelimits-broken/16413>\
**Category:** MacOSX and iOS\
**Created:** [January 15, 2016, 6:02pm UTC](https://forum.juce.com/t/el-capitan-setfullscreen-setresizable-setresizelimits-broken/16413 "2016-01-15T18:02:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matkatmusic](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matkatmusic](https://forum.juce.com/u/matkatmusic)\
**Post date:** [January 15, 2016, 6:02pm UTC](https://forum.juce.com/t/el-capitan-setfullscreen-setresizable-setresizelimits-broken/16413/1 "2016-01-15T18:02:26Z")

</div>

I must be doing something wrong:

```
class MainWindow : public DocumentWindow
    {
    public:
        MainWindow (String name) : DocumentWindow (name,
                                                    Colours::lightgrey,
                                                    DocumentWindow::allButtons)
        {
            setUsingNativeTitleBar (true);
            setContentOwned (new MainContentComponent(), true);
            setResizable(true, true );
            setResizeLimits(128,
                            128,
                            Desktop::getInstance().getDisplays().getMainDisplay().userArea.getWidth(),
                            Desktop::getInstance().getDisplays().getMainDisplay().userArea.getHeight() );
            centreWithSize (getWidth(), getHeight());
            setFullScreen(false);
            setVisible (true);
        }

        void closeButtonPressed() override
        {
            // This is called when the user tries to close this window. Here, we'll just
            // ask the app to quit when this happens, but you can change this to do
            // whatever you need.
            JUCEApplication::getInstance()->systemRequestedQuit();
        }
        /* Note: Be careful if you override any DocumentWindow methods - the base
           class uses a lot of them, so by overriding you might break its functionality.

           It's best to do all your work in your content component instead, but if

           you really have to override any DocumentWindow methods, make sure your

           subclass also calls the superclass's method.

        */

        void maximiseButtonPressed() override {
         
        }
       
    private:
        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow)
    };
```

I'm trying to prevent the Maximize/FullScreen from happening and still allow the ability to resize my app. &nbsp; &nbsp;Is this stuff broken in JUCE 4.1 and OS X 10.11.x?&nbsp;

Also, if I paste code from XCode into a forum thread, it doubles the number of return/new line statements. &nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![matkatmusic](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matkatmusic](https://forum.juce.com/u/matkatmusic)\
**Post date:** [January 15, 2016, 6:06pm UTC](https://forum.juce.com/t/el-capitan-setfullscreen-setresizable-setresizelimits-broken/16413/2 "2016-01-15T18:06:42Z")

</div>

ok, Changing 'setUsingNativeTitleBar()' to false fixes the problem with the maximize button. &nbsp; &nbsp;However, I still can't enable resizing for some reason. &nbsp;

---

<div class="post-metadata">

**Author:** ![matkatmusic](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matkatmusic](https://forum.juce.com/u/matkatmusic)\
**Post date:** [January 15, 2016, 6:36pm UTC](https://forum.juce.com/t/el-capitan-setfullscreen-setresizable-setresizelimits-broken/16413/3 "2016-01-15T18:36:19Z")

</div>

Just wanted to add, if setUsingNativeTitleBar() is set to False, then you can override 'maximiseButtonPressed()'. &nbsp;

if it's set to true, then overriding maximiseButtonPressed() does nothing and is never called.&nbsp;
