mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 11:39:09 +02:00
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:
parent
28cdfdfe8f
commit
7b10b91937
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user