Correctly locate a candidate panel's screen

Previously only the x value was used to determine the screen to which a
candidate panel should below. That was incorrect. The entire point needs
to be considered.

This fixes the same issue that affected OpenVanilla:
https://github.com/openvanilla/openvanilla/issues/49
This commit is contained in:
Lukhnos Liu 2021-11-24 23:22:29 -08:00
parent 5ff3efb385
commit 25ea443891
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@
for (NSScreen *screen in [NSScreen screens]) { for (NSScreen *screen in [NSScreen screens]) {
NSRect frame = [screen visibleFrame]; NSRect frame = [screen visibleFrame];
if (topLeftPoint.x >= NSMinX(frame) && topLeftPoint.x <= NSMaxX(frame)) { if (topLeftPoint.x >= NSMinX(frame) && topLeftPoint.x <= NSMaxX(frame) && topLeftPoint.y >= NSMinY(frame) && topLeftPoint.y <= NSMaxY(frame)) {
screenFrame = frame; screenFrame = frame;
break; break;
} }