cocoa: fix workarea rect implementation for HMonitor and GetSystemMetrics

git-svn-id: trunk@58596 -
This commit is contained in:
dmitry 2018-07-22 20:43:33 +00:00
parent 1e7998c60a
commit 12955c9ea1

View File

@ -1056,10 +1056,11 @@ begin
case uiAction of case uiAction of
SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := 3; SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := 3;
SPI_GETWORKAREA: SPI_GETWORKAREA:
TRect(pvParam^) := Bounds(GetSystemMetrics(SM_XVIRTUALSCREEN), begin
GetSystemMetrics(SM_YVIRTUALSCREEN), NSToLCLRect(NSScreen.mainScreen.visibleFrame
GetSystemMetrics(SM_CXVIRTUALSCREEN), , NSScreen.mainScreen.frame.size.height
GetSystemMetrics(SM_CYVIRTUALSCREEN)); , TRect(pvParam^));
end;
else else
Result := False; Result := False;
end end
@ -1168,7 +1169,7 @@ begin
Result := (lpmi <> nil) and (lpmi^.cbSize >= SizeOf(TMonitorInfo)); Result := (lpmi <> nil) and (lpmi^.cbSize >= SizeOf(TMonitorInfo));
if not Result then Exit; if not Result then Exit;
lpmi^.rcMonitor := NSRectToRect(ScreenID.frame); lpmi^.rcMonitor := NSRectToRect(ScreenID.frame);
lpmi^.rcWork := NSRectToRect(ScreenID.visibleFrame); NSToLCLRect(ScreenID.visibleFrame, ScreenID.frame.size.height, lpmi^.rcWork);
if ScreenID = NSScreen.mainScreen then if ScreenID = NSScreen.mainScreen then
lpmi^.dwFlags := MONITORINFOF_PRIMARY lpmi^.dwFlags := MONITORINFOF_PRIMARY
else else