Details
Description
When a Mac application is put in full screen mode, the Dock and menu bar are automatically hidden. However, the value returned from QDesktopWidget::availableGeometry() still accounts for this space, thus returning an incorrect value.
One manifestation of this issue is that context menus are positioned incorrectly if the right-click occurs in the region the Dock used to occupy. To repro:
- Position the Dock at the bottom of the screen, unhidden.
- Build the attached sample, and run it.
- Click the "dual-arrow" icon in the top-right of the title bar to put the application in full-screen.
- Right-click in the region of the screen the Dock occupied before switching to full-screen.
The context menu will be positioned above the former Dock location.