* Source/NSMenu.m (_setGeometry): take into account main screen

origin when calculating horizontal menu postion.
This commit is contained in:
Sergii Stoian 2020-02-20 01:11:33 +02:00
parent fe1cf36de0
commit 11ff1789e8
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2020-02-20 Sergii Stoian <stoyan255@gmail.com>
* Source/NSMenu.m (_setGeometry): take into account main screen
origin when calculating horizontal menu postion.
* Source/NSApplication.m (_appIconInit): take into account main screen
origin when placing application icon.

View file

@ -470,8 +470,10 @@ static BOOL menuBarVisible = YES;
if (_menu.horizontal == YES)
{
origin = NSMakePoint (0, [[NSScreen mainScreen] frame].size.height
- [_aWindow frame].size.height);
NSRect screenFrame = [[NSScreen mainScreen] frame];
origin = NSMakePoint (0, screenFrame.size.height
- [_aWindow frame].size.height);
origin.y += screenFrame.origin.y;
[_aWindow setFrameOrigin: origin];
[_bWindow setFrameOrigin: origin];
}