MacGapProject / MacGap1

Desktop WebKit wrapper for HTML/CSS/JS applications.
Other
3.55k stars 209 forks source link

macgap.window.isMaximized() unreliable on Yosemite #140

Open jonbot opened 9 years ago

jonbot commented 9 years ago

First of all, MacGap is amazing. Have to get that out of the way.

I know that all new development is going into MacGap 2, but I wanted to post here in case anyone else runs into this issue.

I've found that on Yosemite, macgap.window.isMaximized() sometimes returns 0 when the window is maximized and sometimes returns 1 when the window is not maximized.

I don't know enough about Cocoa to say why this is, but am thinking a good workaround at this point is to use javascript/jQuery w/o the MacGap commands:

var myIsMaximized = screen.height == $(window).height() && screen.width == $(window).width();