VirtualBox

Changeset 57195 in vbox


Ignore:
Timestamp:
Aug 5, 2015 2:23:20 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101947
Message:

FE:Qt 7783:Fix for almost maximum window issue on OS X.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm

    r52751 r57195  
    406406bool darwinIsWindowMaximized(NativeNSWindowRef pWindow)
    407407{
    408     bool fResult = [pWindow isZoomed];
    409 
    410     return fResult;
     408    /* Mac OS X API NSWindow isZoomed returns true even for almost maximized windows,
     409     * So implementing this by ourseleves by comparing visible screen-frame & window-frame: */
     410    NSRect windowFrame = [pWindow frame];
     411    NSRect screenFrame = [[NSScreen mainScreen] visibleFrame];
     412
     413    return (windowFrame.origin.x == screenFrame.origin.x) &&
     414           (windowFrame.origin.y == screenFrame.origin.y) &&
     415           (windowFrame.size.width == screenFrame.size.width) &&
     416           (windowFrame.size.height == screenFrame.size.height);
    411417}
    412418
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette