Qt: fixed wrong result of SPI_GETWORKAREA - it should return available geometry of primary screen. Related to issue #36913

git-svn-id: trunk@62964 -
This commit is contained in:
zeljko 2020-04-14 09:39:50 +00:00
parent 28cdfdfe8f
commit 7b10b91937

View File

@ -7136,14 +7136,19 @@ end;
retrieves or sets the value of one of the system-wide parameters retrieves or sets the value of one of the system-wide parameters
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TQtWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool; function TQtWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool;
var
ADesktop: QDesktopWidgetH;
AScreen: Integer;
R: TRect;
begin begin
case uiAction of case uiAction of
SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := QApplication_wheelScrollLines; SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := QApplication_wheelScrollLines;
SPI_GETWORKAREA: begin SPI_GETWORKAREA:
TRect(pvParam^):=Bounds(GetSystemMetrics(SM_XVIRTUALSCREEN), begin
GetSystemMetrics(SM_YVIRTUALSCREEN), ADesktop := QApplication_desktop();
GetSystemMetrics(SM_CXVIRTUALSCREEN), AScreen := QDesktopWidget_primaryScreen(ADesktop);
GetSystemMetrics(SM_CYVIRTUALSCREEN)); QDesktopWidget_availableGeometry(ADesktop, @R, AScreen);
TRect(pvParam^) := R;
Result:=True; Result:=True;
end; end;
else else