JUCE 1.46 PopupMenu behavior changed?


#1

Hi, I just updated from 1.44 to 1.46, and my systray popup menu now shows up with its bottom few pixels above the top of the taskbar instead of right on my systray menu icon like it used to. Is this a known issue or do I now need to do something else to get the popup menu to show up right on the systray icon?

I already tried specifying showAt() with exact coordinates but it seems the popup menu just can’t overlap the systray taskbar at the bottom of the screen…


#2

Ok… How about this tweak in juce_PopupMenu.cpp:

    void calculateWindowPos (const int minX, const int maxX,
                             const int minY, const int maxY,
                             const bool alignToRectangle)
    {
        const Rectangle mon (Desktop::getInstance()
                                .getMonitorAreaContaining ((minX + maxX) / 2,
                                                           (minY + maxY) / 2,
#if JUCE_MAC
                                                           true));
#else
                                                           false)); // on windows, don't stop the menu overlapping the taskbar
#endif