# minimiseButtonPressed/maximiseButtonPressed handlers aren't called?

**URL:** <https://forum.juce.com/t/minimisebuttonpressed-maximisebuttonpressed-handlers-arent-called/17196>\
**Category:** General JUCE discussion\
**Created:** [April 11, 2016, 12:20pm UTC](https://forum.juce.com/t/minimisebuttonpressed-maximisebuttonpressed-handlers-arent-called/17196 "2016-04-11T12:20:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![OBO](https://avatars.discourse-cdn.com/v4/letter/o/ba8739/32.png) [@OBO](https://forum.juce.com/u/OBO)\
**Post date:** [April 11, 2016, 12:20pm UTC](https://forum.juce.com/t/minimisebuttonpressed-maximisebuttonpressed-handlers-arent-called/17196/1 "2016-04-11T12:20:59Z")

</div>

When using native title bar on Mac, the minimiseButtonPressed/maximiseButtonPressed callback aren’t called…

If its not meant to be called using native title bar, is there any way to detect minimizing/maximizing?

EDIT:  
Digging a bit into the JUCE implementation i see that JUCE is missing some callbacks indeed. Is has “windowShouldClose”, but not “windowWillMinaturize”.

Apple reference:  
[https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSWindowDelegate\_Protocol/#//apple\_ref/occ/intfm/NSWindowDelegate/windowWillMiniaturize:](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSWindowDelegate_Protocol/#//apple_ref/occ/intfm/NSWindowDelegate/windowWillMiniaturize:)

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [April 11, 2016, 3:20pm UTC](https://forum.juce.com/t/minimisebuttonpressed-maximisebuttonpressed-handlers-arent-called/17196/2 "2016-04-11T15:20:01Z")

</div>

Not sure if it’s actually possible on all platforms to intercept all those events, but yes, the DocumentWindow only attempts to call those methods when using the juce-based buttons, not the native behaviours
