mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 21:40:25 +02:00
Qt: bugfix for wrong reported windowstate when we minimize maximized window.
git-svn-id: trunk@20886 -
This commit is contained in:
parent
fd84610a3c
commit
222aa23fd7
@ -188,6 +188,7 @@ type
|
||||
function getTextStatic: Boolean; virtual;
|
||||
function getHeight: Integer;
|
||||
function getWidth: Integer;
|
||||
function getWindowState: QtWindowStates;
|
||||
procedure grabMouse; virtual;
|
||||
function hasFocus: Boolean; virtual;
|
||||
procedure lowerWidget; virtual;
|
||||
@ -2743,7 +2744,7 @@ begin
|
||||
|
||||
Msg.Msg := LM_SIZE;
|
||||
|
||||
case QWidget_windowState(Widget) of
|
||||
case getWindowState of
|
||||
QtWindowMinimized: Msg.SizeType := SIZEICONIC;
|
||||
QtWindowMaximized: Msg.SizeType := SIZEFULLSCREEN;
|
||||
QtWindowFullScreen: Msg.SizeType := SIZEFULLSCREEN;
|
||||
@ -3081,6 +3082,11 @@ begin
|
||||
Result := QWidget_width(Widget);
|
||||
end;
|
||||
|
||||
function TQtWidget.getWindowState: QtWindowStates;
|
||||
begin
|
||||
Result := QWidget_windowState(Widget);
|
||||
end;
|
||||
|
||||
function TQtWidget.getClientBounds: TRect;
|
||||
begin
|
||||
QWidget_contentsRect(getContainerWidget, @Result);
|
||||
@ -4360,14 +4366,14 @@ begin
|
||||
FillChar(Msg, SizeOf(Msg), #0);
|
||||
|
||||
Msg.Msg := LM_SIZE;
|
||||
Msg.SizeType := SIZENORMAL;
|
||||
|
||||
case QWidget_windowState(Widget) of
|
||||
QtWindowMinimized: Msg.SizeType := SIZEICONIC;
|
||||
QtWindowMaximized: Msg.SizeType := SIZEFULLSCREEN;
|
||||
QtWindowFullScreen: Msg.SizeType := SIZEFULLSCREEN;
|
||||
if getWindowState and QtWindowMinimized <> 0 then
|
||||
Msg.SizeType := SIZEICONIC
|
||||
else
|
||||
Msg.SizeType := SIZENORMAL;
|
||||
end;
|
||||
if (getWindowState and QtWindowFullScreen <> 0) or
|
||||
(getWindowState and QtWindowMaximized <> 0) then
|
||||
Msg.SizeType := SIZEFULLSCREEN;
|
||||
|
||||
Msg.SizeType := Msg.SizeType or Size_SourceIsInterface;
|
||||
|
||||
|
@ -4807,7 +4807,7 @@ begin
|
||||
|
||||
Result := False;
|
||||
|
||||
Widget := TQTWidget(hWnd);
|
||||
Widget := TQtWidget(hWnd);
|
||||
|
||||
if Widget <> nil then
|
||||
begin
|
||||
@ -4817,7 +4817,7 @@ begin
|
||||
SW_MINIMIZE: Widget.setWindowState(QtWindowMinimized);
|
||||
SW_SHOWMINIMIZED: Widget.ShowMinimized;
|
||||
SW_SHOWMAXIMIZED: Widget.ShowMaximized;
|
||||
SW_HIDE: TQTWidget(hWnd).setVisible(False);
|
||||
SW_HIDE: Widget.setVisible(False);
|
||||
end;
|
||||
Result := True;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user